Libraryless. Click here for Pure Java version (14457L/101K).
1 | !7 |
2 | |
3 | // TODO: capture all of System.out/System.err |
4 | |
5 | sclass SystemPrintLog extends DynModule { |
6 | transient O log; |
7 | transient JTextArea ta; |
8 | |
9 | void start { |
10 | log = getCreator('print_log); |
11 | doEvery(1000, r updateMe); |
12 | } |
13 | |
14 | JComponent visualize() { |
15 | ret componentPopupMenuItems(jSection("SYSTEM LOG", ta = moveCaretToEnd(typeWriterTextArea(str(log)))), |
16 | "Clear", r { clearStringBuffer_gen(log) }, |
17 | "Copy to new window", r { showText("System Log", log) }); |
18 | } |
19 | |
20 | void unvisualize() { ta = null; } |
21 | |
22 | void update { |
23 | if (ta != null) setText(ta, str(log)); |
24 | } |
25 | } |
Began life as a copy of #1016130
download show line numbers debug dex old transpilations
Travelled to 10 computer(s): aoiabmzegqzx, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, hpgrupgrauku, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, tslmcundralx, tvejysmllsmz
No comments. add comment
Snippet ID: | #1016189 |
Snippet name: | System Print Log [Dyn Module, old version] |
Eternal ID of this version: | #1016189/11 |
Text MD5: | 438e1818e4603707a42be1534887b031 |
Transpilation MD5: | c10bf70b783d215b6c1f5a886e5b8620 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | Yes |
Created/modified: | 2018-11-29 02:22:32 |
Source code size: | 611 bytes / 25 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 474 / 88218 |
Version history: | 10 change(s) |
Referenced in: | [show references] |