Libraryless. Click here for Pure Java version (20642L/126K).
sclass AWTOnConceptChanges is AutoCloseable { settable JComponent component; settable Runnable action; settable Concepts concepts; settable int firstDelay; settable int delay = 500; long changes = -1; javax.swing.Timer timer; *(Concepts *concepts, JComponent *component, Runnable *action) {} void install { assertNotNull(concepts); timer = installTimer(component, delay, firstDelay, r _trigger); } void _trigger { long c = concepts.changes; if (changes != c) { changes = c; action?.run(); } } close { dispose timer; } }
Began life as a copy of #1005359
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1033869 |
Snippet name: | AWTOnConceptChanges - successor of awtOnConceptChanges |
Eternal ID of this version: | #1033869/9 |
Text MD5: | a71fb75bd825d9d161f77e13fc52f9ef |
Transpilation MD5: | f4183a544b54384295a9d0a8bc0cc6c8 |
Author: | stefan |
Category: | javax / concepts / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-01-08 15:53:35 |
Source code size: | 632 bytes / 30 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 175 / 293 |
Version history: | 8 change(s) |
Referenced in: | [show references] |