Libraryless. Click here for Pure Java version (5612L/31K).
static <A extends JComponent> A bindListenerToComponent(A component, IHasChangeListeners source, Runnable listener) { if (source != null && listener != null) bindToComponent(component, r { source.onChangeAndNow(listener); }, r { source.removeChangeListener(listener) }); ret component; }
Began life as a copy of #1016236
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1034435 |
| Snippet name: | bindListenerToComponent |
| Eternal ID of this version: | #1034435/1 |
| Text MD5: | eb3aacf31d33eaacf8be721e7a686cde |
| Transpilation MD5: | 79f34bb92f5502ad1af491bf8927d3ba |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-02-07 20:14:48 |
| Source code size: | 329 bytes / 9 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 436 / 555 |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |