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 classa string log-entry rendererstatic classline info.Nested classes/interfaces inherited from interface org.autogui.swing.log.GuiSwingLogEntry
GuiSwingLogEntry.ContainerType, GuiSwingLogEntry.LogEntryRenderer, GuiSwingLogEntry.SizeCache -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected GuiSwingLogEntry.SizeCacheprotected booleanprotected intprotected intFields 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 TypeMethodDescriptionvoidstatic TextCellRenderer.LineInfocreateLineFollowing(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) intintbooleanstatic intsetHeaderStyle(AttributedString str, String line, String headerEnd, Map<AttributedCharacterIterator.Attribute, Object> style) voidsetSelected(boolean selected) voidsetSelectionFrom(int selectionFrom) voidsetSelectionTo(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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.autogui.base.log.GuiLogEntry
isActiveMethods 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:GuiSwingLogEntryobtains 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:
sizeCachein 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:
getRendererin 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:
clearSelectionin interfaceGuiSwingLogEntry
-
setSelected
public void setSelected(boolean selected) - Specified by:
setSelectedin interfaceGuiSwingLogEntry
-
isSelected
public boolean isSelected()- Specified by:
isSelectedin 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)
-