Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

12
LINES

< > BotCompany Repo | #1026708 // jLiveValueSlider_bothWays (0 to 1, float) [changes when value changes, dev.]

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2824L/18K).

1  
static JSlider jLiveValueSlider_bothWays(final SimpleLiveValue<Float> lv) {
2  
  new AtomicInt changing;
3  
  JSlider slider = liveSliderZeroToOne(lv!, voidfunc(float f) {
4  
    if (changing! == 0)
5  
      lv.set(f);
6  
  });
7  
  bindLiveValueListenerToComponent(slider, lv, r {
8  
    temp tempIncAtomicInt(changing);
9  
    setRelativeSliderValue(slider, lv!);
10  
  });
11  
  ret slider;
12  
}

Author comment

Began life as a copy of #1018690

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1026708
Snippet name: jLiveValueSlider_bothWays (0 to 1, float) [changes when value changes, dev.]
Eternal ID of this version: #1026708/3
Text MD5: 8797cb1d93707a809a16fffbca95dbdc
Transpilation MD5: 354f83581ee0009b28397bf337b2a63f
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-01-19 14:23:39
Source code size: 374 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 202 / 277
Version history: 2 change(s)
Referenced in: [show references]