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).

static JSlider jLiveValueSlider_bothWays(final SimpleLiveValue<Float> lv) {
  new AtomicInt changing;
  JSlider slider = liveSliderZeroToOne(lv!, voidfunc(float f) {
    if (changing! == 0)
      lv.set(f);
  });
  bindLiveValueListenerToComponent(slider, lv, r {
    temp tempIncAtomicInt(changing);
    setRelativeSliderValue(slider, lv!);
  });
  ret slider;
}

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: 201 / 276
Version history: 2 change(s)
Referenced in: [show references]