Libraryless. Click here for Pure Java version (12390L/80K).
abstract sclass DynPrintLog extends DynModule { transient JFastLogView_noWrap printLogView; transient Lock updatePrintLog_lock = lock(); transient StringBuffer actualPrintLog; transient int printLogUpdateInterval = 500; transient JComponent printLogPanel; visual makePrintLogPanel(); JComponent makePrintLogPanel() { JComponent section = printLogPanel = 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 17 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment