Libraryless. Click here for Pure Java version (10578L/74K).
abstract sclass DynPrintLog extends DynModule { transient JFastLogView_noWrap printLogView; transient Lock updatePrintLog_lock = lock(); transient StringBuffer actualPrintLog; transient int printLogUpdateInterval = 500; visualize { JComponent section = jSection("Log", jscroll_copyBackground(printLogView = jFastLogView_noWrap(getPrintLog()))); componentPopupMenuItem(section, "Clear", rEnter dm_clearModulePrintLog); ret awtEvery(section, printLogUpdateInterval, r updatePrintLog); } void updatePrintLog swing { // TODO: optimize lock updatePrintLog_lock; JFastLogView_noWrap _view = printLogView; if (_view == null) ret; if (_view.setText(getPrintLog())) { // Still trying to reliably scroll down scrollAllTheWayDown(_view); awtLater(100, r { scrollAllTheWayDown(_view) }); } } JFastLogView_noWrap myPrintLogComponent() { ret printLogView; } void enableWordWrap { // TODO } S getPrintLog() { if (actualPrintLog == null) { if (printToModule()) actualPrintLog = _printLog; else actualPrintLog = liveLocalPrintLog_realMC(this); } ret str(actualPrintLog); } }
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1016205 |
Snippet name: | DynPrintLog - show program's print log as visualization - new version with fast log view |
Eternal ID of this version: | #1016205/36 |
Text MD5: | 0bc9a9fc374c5f84caa550ea098d1278 |
Transpilation MD5: | 51cf54fa079324d394c07b8c9a5c9cb2 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-02-02 15:51:16 |
Source code size: | 1237 bytes / 40 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 415 / 2136 |
Version history: | 35 change(s) |
Referenced in: | [show references] |
Formerly at http://tinybrain.de/1016205 & http://1016205.tinybrain.de