Libraryless. Click here for Pure Java version (9835L/55K).
1 | static JSlider jLiveValueSlider_double_noScaling(int min, int max, IVarWithNotify<Double> lv) { |
2 | new AtomicInt changing; |
3 | JSlider slider = liveSlider(min, max, clamp(iround(unnull(lv!)), |
4 | min, |
5 | max), v -> { |
6 | if (changing! == 0) |
7 | lv.set((double) v); |
8 | }); |
9 | bindLiveValueListenerToComponent(slider, lv, r { |
10 | temp tempIncAtomicInt(changing); |
11 | setSliderValue(slider, iround(unnull(lv!))); |
12 | }); |
13 | ret slider; |
14 | } |
Began life as a copy of #1031895
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): elmgxqgtpvxh, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1035783 |
Snippet name: | jLiveValueSlider_double_noScaling (just uses ints) |
Eternal ID of this version: | #1035783/6 |
Text MD5: | ab1cf974cf149f04f8811274af0f2280 |
Transpilation MD5: | ae061d90c30905b624b53d2d88ab5807 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-07-25 12:28:03 |
Source code size: | 442 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 125 / 186 |
Version history: | 5 change(s) |
Referenced in: | [show references] |