1 | static JSlider jliveSlider(int min, int max, int def, final VF1<Int> f) { |
2 | final JSlider slider = swingNu(JSlider.class, min, max, def); |
3 | onChange(slider, new Runnable { |
4 | int lastValue = slider.getValue(); |
5 | public void run { |
6 | int value = slider.getValue(); |
7 | if (value != lastValue) |
8 | pcallF(f, lastValue = value); |
9 | } |
10 | }); |
11 | ret slider; |
12 | } |
Began life as a copy of #1005725
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1015496 |
Snippet name: | jliveSlider |
Eternal ID of this version: | #1015496/4 |
Text MD5: | 5ab4f43a88f7f5eb8cfb6157477995ea |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-05-15 03:12:10 |
Source code size: | 376 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 381 / 401 |
Version history: | 3 change(s) |
Referenced in: | [show references] |