Libraryless. Click here for Pure Java version (14606L/101K).
1 | !7 |
2 | |
3 | sclass FindSections > DynPrintLog { |
4 | void start { |
5 | L<JPanel> l = allSwingComponentsOfType(JPanel.class); |
6 | for (JPanel p : l) |
7 | if (eq(className(p), "main$JSection")) { |
8 | S title = (S) call(p, 'getTitle); |
9 | print("Section found: " + title); |
10 | if (eqicOneOf(title, "log", "system log")) { |
11 | JTextArea ta = childOfType(p, JTextArea); |
12 | if (ta == myPrintLogComponent()) continue; |
13 | printIndent(takeFirstLines(2, getText(ta))); |
14 | clearTextArea(ta); |
15 | print("CLEARED"); |
16 | } |
17 | } |
18 | } |
19 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1017745 |
Snippet name: | Find all sections named "Log" or "System Log" and clear them all (doesn't really work) |
Eternal ID of this version: | #1017745/8 |
Text MD5: | 8c6f460e1a47164fe1132f99997fc3dc |
Transpilation MD5: | 5f9343ba71b95efa7e4e61986f3e630b |
Author: | stefan |
Category: | javax / stefan's os |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-08-07 21:43:23 |
Source code size: | 578 bytes / 19 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 395 / 519 |
Version history: | 7 change(s) |
Referenced in: | [show references] |