Libraryless. Click here for Pure Java version (14469L/99K).
1 | !7 |
2 | |
3 | sclass ComponentTree extends DynModule { |
4 | new DynModuleRef mate; |
5 | |
6 | transient JTree tree; |
7 | |
8 | void start { |
9 | ownTimer(doEvery(1000, r updateMe)); |
10 | } |
11 | |
12 | JComponent visualize() { |
13 | final JComponent c = dm_getVisualization(mate!); |
14 | if (c == null) null; |
15 | |
16 | ret jSection(str(mate), wrap( |
17 | jDynamicTree(c, func(Component c) -> L<Component> { |
18 | getComponents(c) |
19 | }))); |
20 | } |
21 | |
22 | void update { |
23 | if (setField(mate := DynModuleRef(dm_closestModule(this)))) |
24 | revisualize(); |
25 | } |
26 | } |
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: | #1016037 |
Snippet name: | Show Component Tree Of Other Module |
Eternal ID of this version: | #1016037/6 |
Text MD5: | 464acccd7caeca989f7cecb9f30bc48d |
Transpilation MD5: | 5a68d1021c76c87904a99ccf487c43ad |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-06-08 15:14:28 |
Source code size: | 540 bytes / 26 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 528 / 709 |
Version history: | 5 change(s) |
Referenced in: | [show references] |