java.lang.Object
org.autogui.swing.util.TextCellRenderer.LineInfo
- Direct Known Subclasses:
GuiSwingLogEntryString.LineInfoHead
- Enclosing class:
TextCellRenderer<ValueType>
a line holding
AttributedString-
Field Summary
FieldsModifier and TypeFieldDescriptionintprotected List<int[]> intprotected TextLayoutprotected intprotected intint -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFindRange(int start, int end) add a new rangedoublebrightness(Color c) voidvoidcolorUpdate(AttributedString attrStr, Color text, Color background, Color selectionForeground, Color selectionBackground, Map<Color, Map<Color, Color>> textToBackToColor) List<int[]> intgetLayout(FontRenderContext frc, int selectionStart, int selectionEnd, Color foreground, Color background, Color selectionForeground, Color selectionBackground, Map<Color, Map<Color, Color>> textToBackToColor) getSelectionShape(TextLayout l, int start, int end) intgetWidth()floatgetX(TextLayout l, int i) voidsetIndent(int indent)
-
Field Details
-
attributedString
-
start
public int start -
end
public int end -
indent
public int indent -
layout
-
selectionStart
protected int selectionStart -
selectionEnd
protected int selectionEnd -
layoutState
-
findRanges
-
-
Constructor Details
-
LineInfo
-
-
Method Details
-
getWidth
public int getWidth()- Returns:
- number of characters including indents
-
setIndent
public void setIndent(int indent) - Parameters:
indent- number of indent characters
-
getIndent
public int getIndent() -
getLayout
- Parameters:
frc- the font-rendering-context used when creating a new text-layout- Returns:
- a new or cached text-layout
-
getLayout
-
colorUpdate
-
getColor
-
brightness
-
clearLayout
public void clearLayout() -
getX
- Parameters:
l- text-layout of the linei- a character index (0 means the line-top)- Returns:
- X position of the right-hit of the character i
-
getSelectionShape
- Parameters:
l- created text-layout of this linestart- same origin as this.startend- same origin as this.start- Returns:
- a logical highlight shape for the range
-
addFindRange
public void addFindRange(int start, int end) add a new range- Parameters:
start- same origin as this.startend- same origin as this.start
-
getFindRanges
- Returns:
- never null
-
clearFindRanges
public void clearFindRanges()
-