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 TypeFieldDescriptionint
protected List
<int[]> int
protected TextLayout
protected int
protected int
int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFindRange
(int start, int end) add a new rangedouble
brightness
(Color c) void
void
colorUpdate
(AttributedString attrStr, Color text, Color background, Color selectionForeground, Color selectionBackground, Map<Color, Map<Color, Color>> textToBackToColor) List
<int[]> int
getLayout
(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) int
getWidth()
float
getX
(TextLayout l, int i) void
setIndent
(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()
-