Libraryless. Click here for Pure Java version (11689L/67K).
1 | sclass JCalculatedComponent<A extends JComponent> extends SingleComponentPanel is ChangeTriggerable { |
2 | settable IF0<A> makeComponent; |
3 | |
4 | *(IF0<A> *makeComponent) {} |
5 | |
6 | transient ReliableSingleThread rstMakeComponent = new(-> { |
7 | setComponent(makeComponent?!); |
8 | }); |
9 | |
10 | { |
11 | bindToComponent(this, -> { |
12 | /*if (!hasComponent())*/ rstMakeComponent.trigger(); |
13 | }, null); |
14 | } |
15 | |
16 | public void change { |
17 | rstMakeComponent.trigger(); |
18 | } |
19 | |
20 | void reactToChangesIn(IHasChangeListeners source) { |
21 | bindHasChangeListenersToComponent(this, source, l0 change); |
22 | } |
23 | } |
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): elmgxqgtpvxh, mqqgnosmbjvj, wnsclhtenguj
No comments. add comment
Snippet ID: | #1036181 |
Snippet name: | JCalculatedComponent |
Eternal ID of this version: | #1036181/3 |
Text MD5: | b7fa2f32f11d8d3a9f5cabb7cf11938f |
Transpilation MD5: | a302d4e109923ae7280d0c925f9d7fcb |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-10-07 18:11:29 |
Source code size: | 596 bytes / 23 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 131 / 203 |
Version history: | 2 change(s) |
Referenced in: | [show references] |