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); } }