Libraryless. Click here for Pure Java version (9816L/55K).
1 | static JSlider jLiveValueSlider_double_bothWays(double min, double max, IVarWithNotify<Double> lv) { |
2 | new AtomicInt changing; |
3 | JSlider slider = liveSliderZeroToOne((float) ((unnull(lv!)-min)/(max-min)), voidfunc(float f) { |
4 | if (changing! == 0) |
5 | lv.set(min+f*(max-min)); |
6 | }); |
7 | bindLiveValueListenerToComponent(slider, lv, r { |
8 | temp tempIncAtomicInt(changing); |
9 | setRelativeSliderValue(slider, (unnull(lv!)-min)/(max-min)); |
10 | }); |
11 | ret slider; |
12 | } |
Began life as a copy of #1026708
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx
No comments. add comment
Snippet ID: | #1031895 |
Snippet name: | jLiveValueSlider_double_bothWays |
Eternal ID of this version: | #1031895/7 |
Text MD5: | 2c1aac2455fe9d925cca7a686c1679f0 |
Transpilation MD5: | 8a0da3837f31471d6282ddd586b26c86 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-07-19 20:02:29 |
Source code size: | 471 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 181 / 281 |
Version history: | 6 change(s) |
Referenced in: | [show references] |