Libraryless. Click here for Pure Java version (5496L/31K).
static <A extends JComponent> A awtStepContinuously(A component, Steppable steppable) { if (steppable == null) ret component; new SingleThread thread; new BoolVar visible; var info = _threadInfo(); Runnable theLoop = r { _threadInheritInfo(info); while ping (visible! && steppable.step()) {} }; bindToComponent(component, -> { visible.set(); thread.go(theLoop); }, -> visible.clear()); ret component; }
Began life as a copy of #1034897
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034900 |
Snippet name: | awtStepContinuously |
Eternal ID of this version: | #1034900/1 |
Text MD5: | d5694d211bfdef13994ed45fa8ce0fd6 |
Transpilation MD5: | 4d65b5809003e3decc76c5a6aeaa6e30 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-03-13 04:57:31 |
Source code size: | 457 bytes / 17 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 143 / 188 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |