Package com.tonic.vellum.widget
Class LogSection
- java.lang.Object
-
- com.tonic.vellum.Section
-
- com.tonic.vellum.widget.ScrollSection
-
- com.tonic.vellum.widget.LogSection
-
public final class LogSection extends ScrollSection
A ScrollSection for logs: follows the tail by default and retains a bounded number of lines, dropping the oldest. CallmaxLines(0)for unlimited.
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_MAX_LINESDefault retained line cap, to bound memory for long-running logs.
-
Constructor Summary
Constructors Constructor Description LogSection()Creates a log section that follows the tail and retains DEFAULT_MAX_LINES lines.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LogSectionappend(java.lang.String line)Appends a log line.-
Methods inherited from class com.tonic.vellum.widget.ScrollSection
followTail, lineCount, maxLines, scrollTop, setLines, style, wrap
-
-
-
-
Field Detail
-
DEFAULT_MAX_LINES
public static final int DEFAULT_MAX_LINES
Default retained line cap, to bound memory for long-running logs.- See Also:
- Constant Field Values
-
-
Method Detail
-
append
public LogSection append(java.lang.String line)
Appends a log line. Must be called on the UI thread (useApp.postfrom others).- Parameters:
line- the line to append- Returns:
- this LogSection for chaining
-
-