java.lang.Object
org.autogui.base.log.GuiLogEntryString
org.autogui.swing.log.GuiSwingLogEntryString
- All Implemented Interfaces:
GuiLogEntry
,GuiSwingLogEntry
a log-entry of a string message with supporting GUI rendering
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
a string log-entry rendererstatic class
line info.Nested classes/interfaces inherited from interface org.autogui.swing.log.GuiSwingLogEntry
GuiSwingLogEntry.ContainerType, GuiSwingLogEntry.LogEntryRenderer, GuiSwingLogEntry.SizeCache
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected GuiSwingLogEntry.SizeCache
protected boolean
protected int
protected int
Fields inherited from class org.autogui.base.log.GuiLogEntryString
data, fromStandard, time
-
Constructor Summary
ConstructorsConstructorDescriptionGuiSwingLogEntryString
(String data) GuiSwingLogEntryString
(String data, boolean fromStdout) GuiSwingLogEntryString
(Instant time, String data) -
Method Summary
Modifier and TypeMethodDescriptionvoid
static TextCellRenderer.LineInfo
createLineFollowing
(TextCellRenderer.LineInfo prevLine, int lineIndex, int start, String line, Map<AttributedCharacterIterator.Attribute, Object> attrs) createLineHead
(int start, String line, Object idxIntOrDelimStr, Map<AttributedCharacterIterator.Attribute, Object> headAttrs, Map<AttributedCharacterIterator.Attribute, Object> attrs) getRenderer
(GuiSwingLogManager manager, GuiSwingLogEntry.ContainerType type) int
int
boolean
static int
setHeaderStyle
(AttributedString str, String line, String headerEnd, Map<AttributedCharacterIterator.Attribute, Object> style) void
setSelected
(boolean selected) void
setSelectionFrom
(int selectionFrom) void
setSelectionTo
(int selectionTo) float[]
obtains cached layout-size or computes it by the size.Methods inherited from class org.autogui.base.log.GuiLogEntryString
getData, getTime, isFromStandard, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.autogui.base.log.GuiLogEntry
isActive
Methods inherited from interface org.autogui.swing.log.GuiSwingLogEntry
getRendererKey
-
Field Details
-
selectionFrom
protected int selectionFrom -
selectionTo
protected int selectionTo -
selected
protected boolean selected -
rendererToSizeCache
-
-
Constructor Details
-
GuiSwingLogEntryString
-
GuiSwingLogEntryString
- Parameters:
data
- the string datafromStdout
- whether stdout redirection- Since:
- 1.1
-
GuiSwingLogEntryString
-
-
Method Details
-
sizeCache
Description copied from interface:GuiSwingLogEntry
obtains cached layout-size or computes it by the size. the default impl. is just always computing as no caching. available bySizeCache c = new SizeCache(2); float[] sizeCache(Object k, Supplier src) { return c.computeIfAbsent(k, _k -> src.get()); }
- Specified by:
sizeCache
in interfaceGuiSwingLogEntry
- Parameters:
r
- the key for the sizesrc
- the task for computing the size- Returns:
- the layout-size, {w,h}
-
getRenderer
public GuiSwingLogEntry.LogEntryRenderer getRenderer(GuiSwingLogManager manager, GuiSwingLogEntry.ContainerType type) - Specified by:
getRenderer
in interfaceGuiSwingLogEntry
- Parameters:
manager
- the managertype
- rendering for a list or a status-bar- Returns:
- factory method of renderer
-
getSelectionFrom
public int getSelectionFrom() -
setSelectionFrom
public void setSelectionFrom(int selectionFrom) -
getSelectionTo
public int getSelectionTo() -
setSelectionTo
public void setSelectionTo(int selectionTo) -
clearSelection
public void clearSelection()- Specified by:
clearSelection
in interfaceGuiSwingLogEntry
-
setSelected
public void setSelected(boolean selected) - Specified by:
setSelected
in interfaceGuiSwingLogEntry
-
isSelected
public boolean isSelected()- Specified by:
isSelected
in interfaceGuiSwingLogEntry
-
getTimeStyle
-
getBodyStyle
-
setHeaderStyle
public static int setHeaderStyle(AttributedString str, String line, String headerEnd, Map<AttributedCharacterIterator.Attribute, Object> style) -
createLineHead
public static GuiSwingLogEntryString.LineInfoHead createLineHead(int start, String line, Object idxIntOrDelimStr, Map<AttributedCharacterIterator.Attribute, Object> headAttrs, Map<AttributedCharacterIterator.Attribute, Object> attrs) -
createLineFollowing
public static TextCellRenderer.LineInfo createLineFollowing(TextCellRenderer.LineInfo prevLine, int lineIndex, int start, String line, Map<AttributedCharacterIterator.Attribute, Object> attrs)
-