Gridarta Editor
net.sf.gridarta.textedit.textarea.TextAreaPainter Class Reference

The text area repaint manager. More...

+ Inheritance diagram for net.sf.gridarta.textedit.textarea.TextAreaPainter:
+ Collaboration diagram for net.sf.gridarta.textedit.textarea.TextAreaPainter:

Public Member Functions

int getCurrentLineIndex ()
 Returns the currently painted line. More...
 
List< TokengetCurrentLineTokens ()
 Returns the tokens of the currently painted line. More...
 
int getDefaultCharWidth ()
 This works only for fonts with fixed line height. More...
 
int getDefaultLineHeight ()
 This works only for fonts with fixed line height. More...
 
int getFirstLine ()
 Returns the line displayed at the text area's origin. More...
 
FontMetrics getFontMetrics ()
 Returns the font metrics used by this component. More...
 
int getHorizontalOffset ()
 Returns the horizontal offset of drawn lines. More...
 
Dimension getMinimumSize ()
 
Dimension getPreferredSize ()
 
SyntaxStyles getStyles ()
 Returns the syntax styles used to paint colorized text. More...
 
int getVisibleLines ()
 
void invalidateLine (final int line)
 Marks a line as needing a repaint. More...
 
void invalidateLineRange (final int firstLine, final int lastLine)
 Marks a range of lines as needing a repaint. More...
 
void invalidateSelectedLines ()
 Repaints the lines containing the selection. More...
 
boolean isBlockCaretEnabled ()
 Returns whether the caret should be drawn as a block. More...
 
boolean isBracketHighlightEnabled ()
 Returns whether bracket highlighting is enabled. More...
 
int lineToY (final int line)
 Converts a line index to a y co-ordinate. More...
 
float nextTabStop (final float x, final int tabOffset)
 
int offsetToX (final int line, final int offset)
 Converts an offset in a line into an x co-ordinate. More...
 
int offsetToX2 (final int line, final int offset)
 Converts an offset in a line into an x co-ordinate. More...
 
void paint (@NotNull final Graphics g)
 Repaints the text. More...
 
void recalculateVisibleLines ()
 Recalculates the number of visible lines. More...
 
void setCurrentLineIndex (final int lineIndex)
 Sets the currently painted line. More...
 
void setCurrentLineTokens (@Nullable final List< Token > tokens)
 Sets the tokens of the currently painted line. More...
 
boolean setFirstLine (final int firstLine)
 
final void setFont (@NotNull final Font font)
 
boolean setHorizontalOffset (final int horizontalOffset)
 
void setStyles (@NotNull final SyntaxStyles styles)
 Sets the syntax styles used to paint colorized text. More...
 
 TextAreaPainter (@NotNull final JEditTextArea textArea, @NotNull final TextAreaSelection selection, @NotNull final TextAreaCaret caret, @NotNull final TextAreaDefaults defaults, @NotNull final TextAreaBrackets brackets, @NotNull final TextAreaConfig config, final boolean paintInvalid)
 Creates a new repaint manager. More...
 
int xToOffset (final int line, final int x)
 Converts an x co-ordinate to an offset within a line. More...
 
int xyToOffset (final int x, final int y)
 Converts a point to an offset, from the start of the text. More...
 
int yToLine (final int y)
 Converts a y co-ordinate to a line index. More...
 

Private Member Functions

Dimension newDimension (final int columns, final int rows)
 Returns a Dimension measured in default character sizes. More...
 
void paintBracketHighlight (@NotNull final Graphics gfx, final int line, final int y)
 Paints the bracket highlight. More...
 
void paintCaret (@NotNull final Graphics gfx, final int line, final int y)
 Paints the caret highlight. More...
 
void paintHighlight (@NotNull final Graphics gfx, final int line, final int y)
 Adds highlights for a line: selections, custom highlights from client code, brackets, caret. More...
 
void paintLine (@NotNull final Graphics gfx, @Nullable final TokenMarker tokenMarker, final int line, final int x)
 Paints one line. More...
 
void paintLineHighlight (@NotNull final Graphics gfx, final int line, final int y)
 Paints the selection highlight. More...
 
void paintPlainLine (@NotNull final Graphics gfx, final int line, @NotNull final Font defaultFont, @NotNull final Color defaultColor, final int x, final int y)
 Paint a line without token highlighting. More...
 
void paintSyntaxLine (@NotNull final Graphics gfx, @NotNull final TokenMarker tokenMarker, final int line, @NotNull final Font defaultFont, @NotNull final Color defaultColor, final int x, final int y)
 Paint a line with token highlighting. More...
 
void updateLineInfo ()
 Make sure defaultCharWidth and defaultLineHeight are up-to-date. More...
 

Private Attributes

final boolean blockCaret
 Whether the caret should be wide even in insert mode. More...
 
final boolean bracketHighlight
 Whether bracket highlighting is enabled. More...
 
final Color bracketHighlightColor
 The color for bracket highlighting. More...
 
final TextAreaBrackets brackets
 The brackets to paint. More...
 
final TextAreaCaret caret
 
final Color caretColor
 The caret color. More...
 
final int cols
 The number of columns. More...
 
final TextAreaConfig config
 The TextAreaConfig options to use. More...
 
final Segment currentLine = new Segment()
 Holds the currently painted line. More...
 
int currentLineIndex = -1
 The currently painted line. More...
 
List< TokencurrentLineTokens
 The tokens of the currently painted line. More...
 
int defaultCharWidth
 The character width of defaultFont. More...
 
Font defaultFont
 The Font from which defaultLineHeight and defaultCharWidth have been calculated. More...
 
int defaultLineHeight
 The line height of defaultFont. More...
 
final Color eolMarkerColor
 The color for painting eol markers. More...
 
final boolean eolMarkers
 Whether end of line markers should be painted. More...
 
int firstLine
 
FontMetrics fontMetrics
 The font metrics for this instance. More...
 
final FontRenderContext fontRenderContext = new FontRenderContext(null, false, false)
 The font render context for this instance. More...
 
int horizontalOffset
 
final boolean lineHighlight
 Whether line highlighting is enabled. More...
 
final Color lineHighlightColor
 The color for line highlighting. More...
 
final Segment lineSegment = new Segment()
 
final boolean paintInvalid
 Whether invalid lines should be painted as red tildes. More...
 
final int rows
 The number of rows. More...
 
final TextAreaSelection selection
 
final Color selectionColor
 The selection color. More...
 
SyntaxStyles styles
 The syntax styles used to paint colorized text. More...
 
int tabSize
 The tab size in pixels. More...
 
final JEditTextArea textArea
 The associated text area that is painted. More...
 
int visibleLines
 

Static Private Attributes

static final Category LOG = Logger.getLogger(TextAreaPainter.class)
 The Logger for printing log messages. More...
 
static final long serialVersionUID = 1L
 The serial version UID. More...
 

Detailed Description

The text area repaint manager.

It performs double buffering and paints lines of text.

Author
Slava Pestov
Andreas Vogl

Definition at line 42 of file TextAreaPainter.java.

Constructor & Destructor Documentation

◆ TextAreaPainter()

net.sf.gridarta.textedit.textarea.TextAreaPainter.TextAreaPainter ( @NotNull final JEditTextArea  textArea,
@NotNull final TextAreaSelection  selection,
@NotNull final TextAreaCaret  caret,
@NotNull final TextAreaDefaults  defaults,
@NotNull final TextAreaBrackets  brackets,
@NotNull final TextAreaConfig  config,
final boolean  paintInvalid 
)

Creates a new repaint manager.

This should be not be called directly.

Parameters
textAreathe associated text area that is painted
defaultsthe text attributes to use
bracketsthe brackets to paint
configthe text area configuration options to use
paintInvalidwhether invalid lines should be painted as red tildes

Definition at line 233 of file TextAreaPainter.java.

References net.sf.gridarta.textedit.textarea.TextAreaPainter.brackets, net.sf.gridarta.textedit.textarea.TextAreaPainter.caret, net.sf.gridarta.textedit.textarea.TextAreaPainter.config, net.sf.gridarta.textedit.textarea.TextAreaPainter.getFontMetrics(), net.sf.gridarta.textedit.textarea.TextAreaPainter.paintInvalid, net.sf.gridarta.textedit.textarea.TextAreaPainter.selection, and net.sf.gridarta.textedit.textarea.TextAreaPainter.textArea.

+ Here is the call graph for this function:

Member Function Documentation

◆ getCurrentLineIndex()

int net.sf.gridarta.textedit.textarea.TextAreaPainter.getCurrentLineIndex ( )

Returns the currently painted line.

Returns
the line index

Definition at line 659 of file TextAreaPainter.java.

References net.sf.gridarta.textedit.textarea.TextAreaPainter.currentLineIndex.

◆ getCurrentLineTokens()

List<Token> net.sf.gridarta.textedit.textarea.TextAreaPainter.getCurrentLineTokens ( )

Returns the tokens of the currently painted line.

Returns
the tokens

Definition at line 676 of file TextAreaPainter.java.

Referenced by net.sf.gridarta.textedit.textarea.TextAreaPainter.offsetToX2(), and net.sf.gridarta.textedit.textarea.TextAreaPainter.xToOffset().

+ Here is the caller graph for this function:

◆ getDefaultCharWidth()

int net.sf.gridarta.textedit.textarea.TextAreaPainter.getDefaultCharWidth ( )

This works only for fonts with fixed line height.

It's sort of hack to avoid the use of deprecated methods.

Returns
default line height in pixels

Definition at line 299 of file TextAreaPainter.java.

References net.sf.gridarta.textedit.textarea.TextAreaPainter.defaultCharWidth, and net.sf.gridarta.textedit.textarea.TextAreaPainter.updateLineInfo().

Referenced by net.sf.gridarta.textedit.textarea.JEditTextArea.updateScrollBars().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDefaultLineHeight()

int net.sf.gridarta.textedit.textarea.TextAreaPainter.getDefaultLineHeight ( )

This works only for fonts with fixed line height.

It's sort of hack to avoid the use of deprecated methods.

Returns
default line height in pixels

Definition at line 289 of file TextAreaPainter.java.

References net.sf.gridarta.textedit.textarea.TextAreaPainter.defaultLineHeight, and net.sf.gridarta.textedit.textarea.TextAreaPainter.updateLineInfo().

Referenced by net.sf.gridarta.textedit.textarea.TextAreaPainter.recalculateVisibleLines().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFirstLine()

int net.sf.gridarta.textedit.textarea.TextAreaPainter.getFirstLine ( )

◆ getFontMetrics()

FontMetrics net.sf.gridarta.textedit.textarea.TextAreaPainter.getFontMetrics ( )

Returns the font metrics used by this component.

Returns
the font metrics

Definition at line 347 of file TextAreaPainter.java.

References net.sf.gridarta.textedit.textarea.TextAreaPainter.fontMetrics.

Referenced by net.sf.gridarta.textedit.textarea.JEditTextArea.scrollTo(), net.sf.gridarta.textedit.textarea.TextAreaPainter.setFont(), and net.sf.gridarta.textedit.textarea.TextAreaPainter.TextAreaPainter().

+ Here is the caller graph for this function:

◆ getHorizontalOffset()

int net.sf.gridarta.textedit.textarea.TextAreaPainter.getHorizontalOffset ( )

Returns the horizontal offset of drawn lines.

Definition at line 738 of file TextAreaPainter.java.

References net.sf.gridarta.textedit.textarea.TextAreaPainter.horizontalOffset.

Referenced by net.sf.gridarta.textedit.textarea.JEditTextArea.scrollTo(), and net.sf.gridarta.textedit.textarea.JEditTextArea.updateScrollBars().

+ Here is the caller graph for this function:

◆ getMinimumSize()

Dimension net.sf.gridarta.textedit.textarea.TextAreaPainter.getMinimumSize ( )

Definition at line 435 of file TextAreaPainter.java.

References net.sf.gridarta.textedit.textarea.TextAreaPainter.newDimension().

+ Here is the call graph for this function:

◆ getPreferredSize()

Dimension net.sf.gridarta.textedit.textarea.TextAreaPainter.getPreferredSize ( )

Definition at line 428 of file TextAreaPainter.java.

References net.sf.gridarta.textedit.textarea.TextAreaPainter.newDimension().

+ Here is the call graph for this function:

◆ getStyles()

SyntaxStyles net.sf.gridarta.textedit.textarea.TextAreaPainter.getStyles ( )

Returns the syntax styles used to paint colorized text.

Returns
the styles
See also
Token

Definition at line 310 of file TextAreaPainter.java.

References net.sf.gridarta.textedit.textarea.TextAreaPainter.styles.

◆ getVisibleLines()

int net.sf.gridarta.textedit.textarea.TextAreaPainter.getVisibleLines ( )

Definition at line 707 of file TextAreaPainter.java.

References net.sf.gridarta.textedit.textarea.TextAreaPainter.visibleLines.

Referenced by net.sf.gridarta.textedit.textarea.JEditTextArea.getVisibleLines().

+ Here is the caller graph for this function:

◆ invalidateLine()

void net.sf.gridarta.textedit.textarea.TextAreaPainter.invalidateLine ( final int  line)

Marks a line as needing a repaint.

Parameters
linethe line to invalidate

Definition at line 400 of file TextAreaPainter.java.

References net.sf.gridarta.textedit.textarea.TextAreaPainter.lineToY().

Referenced by net.sf.gridarta.textedit.textarea.JEditTextArea.documentChanged(), and net.sf.gridarta.textedit.textarea.JEditTextArea.select().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ invalidateLineRange()

void net.sf.gridarta.textedit.textarea.TextAreaPainter.invalidateLineRange ( final int  firstLine,
final int  lastLine 
)

Marks a range of lines as needing a repaint.

Parameters
firstLinethe first line to invalidate
lastLinethe last line to invalidate

Definition at line 409 of file TextAreaPainter.java.

References net.sf.gridarta.textedit.textarea.TextAreaPainter.lineToY().

Referenced by net.sf.gridarta.textedit.textarea.JEditTextArea.documentChanged(), net.sf.gridarta.textedit.textarea.TextAreaPainter.invalidateSelectedLines(), and net.sf.gridarta.textedit.textarea.JEditTextArea.select().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ invalidateSelectedLines()

◆ isBlockCaretEnabled()

boolean net.sf.gridarta.textedit.textarea.TextAreaPainter.isBlockCaretEnabled ( )

Returns whether the caret should be drawn as a block.

Returns
whether the caret should be drawn as a block

Definition at line 338 of file TextAreaPainter.java.

References net.sf.gridarta.textedit.textarea.TextAreaPainter.blockCaret.

◆ isBracketHighlightEnabled()

boolean net.sf.gridarta.textedit.textarea.TextAreaPainter.isBracketHighlightEnabled ( )

Returns whether bracket highlighting is enabled.

When bracket highlighting is enabled, the bracket matching the one before the caret (if any) is highlighted.

Returns
whether bracket highlighting is enabled

Definition at line 330 of file TextAreaPainter.java.

References net.sf.gridarta.textedit.textarea.TextAreaPainter.bracketHighlight.

Referenced by net.sf.gridarta.textedit.textarea.JEditTextArea.select().

+ Here is the caller graph for this function:

◆ lineToY()

int net.sf.gridarta.textedit.textarea.TextAreaPainter.lineToY ( final int  line)

◆ newDimension()

Dimension net.sf.gridarta.textedit.textarea.TextAreaPainter.newDimension ( final int  columns,
final int  rows 
)
private

Returns a Dimension measured in default character sizes.

Parameters
columnsthe width in characters
rowsthe height in rows
Returns
the dimension

Definition at line 447 of file TextAreaPainter.java.

Referenced by net.sf.gridarta.textedit.textarea.TextAreaPainter.getMinimumSize(), and net.sf.gridarta.textedit.textarea.TextAreaPainter.getPreferredSize().

+ Here is the caller graph for this function:

◆ nextTabStop()

float net.sf.gridarta.textedit.textarea.TextAreaPainter.nextTabStop ( final float  x,
final int  tabOffset 
)

Definition at line 421 of file TextAreaPainter.java.

References net.sf.gridarta.textedit.textarea.TextAreaPainter.tabSize.

Referenced by net.sf.gridarta.textedit.textarea.TextAreaPainter.xToOffset().

+ Here is the caller graph for this function:

◆ offsetToX()

int net.sf.gridarta.textedit.textarea.TextAreaPainter.offsetToX ( final int  line,
final int  offset 
)

Converts an offset in a line into an x co-ordinate.

This is a slow version that can be used any time.

Parameters
linethe line
offsetthe offset, from the start of the line

Definition at line 814 of file TextAreaPainter.java.

References net.sf.gridarta.textedit.textarea.TextAreaPainter.offsetToX2(), and net.sf.gridarta.textedit.textarea.TextAreaPainter.setCurrentLineTokens().

Referenced by net.sf.gridarta.textedit.textarea.JEditTextArea.offsetToX().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ offsetToX2()

int net.sf.gridarta.textedit.textarea.TextAreaPainter.offsetToX2 ( final int  line,
final int  offset 
)

◆ paint()

void net.sf.gridarta.textedit.textarea.TextAreaPainter.paint ( @NotNull final Graphics  g)

◆ paintBracketHighlight()

void net.sf.gridarta.textedit.textarea.TextAreaPainter.paintBracketHighlight ( @NotNull final Graphics  gfx,
final int  line,
final int  y 
)
private

Paints the bracket highlight.

Parameters
gfxthe graphics to paint to
linethe line index
ythe y-offset for painting

Definition at line 609 of file TextAreaPainter.java.

References net.sf.gridarta.textedit.textarea.TextAreaBrackets.getBracketPosition(), and net.sf.gridarta.textedit.textarea.TextAreaPainter.offsetToX2().

Referenced by net.sf.gridarta.textedit.textarea.TextAreaPainter.paintHighlight().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ paintCaret()

void net.sf.gridarta.textedit.textarea.TextAreaPainter.paintCaret ( @NotNull final Graphics  gfx,
final int  line,
final int  y 
)
private

◆ paintHighlight()

void net.sf.gridarta.textedit.textarea.TextAreaPainter.paintHighlight ( @NotNull final Graphics  gfx,
final int  line,
final int  y 
)
private

◆ paintLine()

void net.sf.gridarta.textedit.textarea.TextAreaPainter.paintLine ( @NotNull final Graphics  gfx,
@Nullable final TokenMarker  tokenMarker,
final int  line,
final int  x 
)
private

◆ paintLineHighlight()

◆ paintPlainLine()

void net.sf.gridarta.textedit.textarea.TextAreaPainter.paintPlainLine ( @NotNull final Graphics  gfx,
final int  line,
@NotNull final Font  defaultFont,
@NotNull final Color  defaultColor,
final int  x,
final int  y 
)
private

Paint a line without token highlighting.

Parameters
gfxthe graphics to paint to
linethe line index
defaultFontthe font to use
defaultColorthe color to use
xthe x-offset for painting
ythe y-offset for painting

Definition at line 487 of file TextAreaPainter.java.

References net.sf.gridarta.textedit.textarea.TextAreaSelection.getLineText(), and net.sf.gridarta.textedit.textarea.TextAreaPainter.paintHighlight().

Referenced by net.sf.gridarta.textedit.textarea.TextAreaPainter.paintLine().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ paintSyntaxLine()

void net.sf.gridarta.textedit.textarea.TextAreaPainter.paintSyntaxLine ( @NotNull final Graphics  gfx,
@NotNull final TokenMarker  tokenMarker,
final int  line,
@NotNull final Font  defaultFont,
@NotNull final Color  defaultColor,
final int  x,
final int  y 
)
private

Paint a line with token highlighting.

Parameters
gfxthe graphics to paint to
tokenMarkerthe token marker to use
linethe line index
defaultFontthe font to use
defaultColorthe color to use
xthe x-offset for painting
ythe y-offset for painting

Definition at line 513 of file TextAreaPainter.java.

References net.sf.gridarta.textedit.textarea.TextAreaSelection.getLineText(), net.sf.gridarta.textedit.textarea.TextAreaPainter.paintHighlight(), and net.sf.gridarta.textedit.textarea.SyntaxUtilities.paintSyntaxLine().

Referenced by net.sf.gridarta.textedit.textarea.TextAreaPainter.paintLine().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ recalculateVisibleLines()

void net.sf.gridarta.textedit.textarea.TextAreaPainter.recalculateVisibleLines ( )

Recalculates the number of visible lines.

This should not be called directly.

Definition at line 692 of file TextAreaPainter.java.

References net.sf.gridarta.textedit.textarea.TextAreaPainter.getDefaultLineHeight(), and net.sf.gridarta.textedit.textarea.JEditTextArea.updateScrollBars().

Referenced by net.sf.gridarta.textedit.textarea.JEditTextArea.ComponentHandler.componentResized(), and net.sf.gridarta.textedit.textarea.TextAreaPainter.setFont().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setCurrentLineIndex()

void net.sf.gridarta.textedit.textarea.TextAreaPainter.setCurrentLineIndex ( final int  lineIndex)

Sets the currently painted line.

Parameters
lineIndexthe line index

Definition at line 667 of file TextAreaPainter.java.

◆ setCurrentLineTokens()

void net.sf.gridarta.textedit.textarea.TextAreaPainter.setCurrentLineTokens ( @Nullable final List< Token tokens)

Sets the tokens of the currently painted line.

Parameters
tokensthe tokens

Definition at line 684 of file TextAreaPainter.java.

Referenced by net.sf.gridarta.textedit.textarea.TextAreaPainter.offsetToX(), net.sf.gridarta.textedit.textarea.TextAreaPainter.offsetToX2(), and net.sf.gridarta.textedit.textarea.TextAreaPainter.xToOffset().

+ Here is the caller graph for this function:

◆ setFirstLine()

boolean net.sf.gridarta.textedit.textarea.TextAreaPainter.setFirstLine ( final int  firstLine)

◆ setFont()

final void net.sf.gridarta.textedit.textarea.TextAreaPainter.setFont ( @NotNull final Font  font)

Definition at line 352 of file TextAreaPainter.java.

References net.sf.gridarta.textedit.textarea.TextAreaPainter.getFontMetrics(), and net.sf.gridarta.textedit.textarea.TextAreaPainter.recalculateVisibleLines().

Referenced by net.sf.gridarta.textedit.textarea.JEditTextArea.setFont().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setHorizontalOffset()

boolean net.sf.gridarta.textedit.textarea.TextAreaPainter.setHorizontalOffset ( final int  horizontalOffset)

◆ setStyles()

void net.sf.gridarta.textedit.textarea.TextAreaPainter.setStyles ( @NotNull final SyntaxStyles  styles)

Sets the syntax styles used to paint colorized text.

Parameters
stylesthe syntax styles
See also
Token

Definition at line 319 of file TextAreaPainter.java.

References net.sf.gridarta.textedit.textarea.TextAreaPainter.styles.

◆ updateLineInfo()

void net.sf.gridarta.textedit.textarea.TextAreaPainter.updateLineInfo ( )
private

◆ xToOffset()

◆ xyToOffset()

int net.sf.gridarta.textedit.textarea.TextAreaPainter.xyToOffset ( final int  x,
final int  y 
)

Converts a point to an offset, from the start of the text.

Parameters
xthe x co-ordinate of the point
ythe y co-ordinate of the point

Definition at line 928 of file TextAreaPainter.java.

References net.sf.gridarta.textedit.textarea.TextAreaSelection.getLineStartOffset(), net.sf.gridarta.textedit.textarea.TextAreaPainter.xToOffset(), and net.sf.gridarta.textedit.textarea.TextAreaPainter.yToLine().

Referenced by net.sf.gridarta.textedit.textarea.JEditTextArea.DragHandler.mouseDragged().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ yToLine()

int net.sf.gridarta.textedit.textarea.TextAreaPainter.yToLine ( final int  y)

Converts a y co-ordinate to a line index.

Parameters
ythe y co-ordinate

Definition at line 824 of file TextAreaPainter.java.

References net.sf.gridarta.textedit.textarea.TextAreaPainter.firstLine, net.sf.gridarta.textedit.textarea.TextAreaPainter.fontMetrics, and net.sf.gridarta.textedit.textarea.TextAreaSelection.getLineCount().

Referenced by net.sf.gridarta.textedit.textarea.JEditTextArea.MouseHandler.mousePressed(), and net.sf.gridarta.textedit.textarea.TextAreaPainter.xyToOffset().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ blockCaret

final boolean net.sf.gridarta.textedit.textarea.TextAreaPainter.blockCaret
private

Whether the caret should be wide even in insert mode.

Definition at line 87 of file TextAreaPainter.java.

Referenced by net.sf.gridarta.textedit.textarea.TextAreaPainter.isBlockCaretEnabled().

◆ bracketHighlight

final boolean net.sf.gridarta.textedit.textarea.TextAreaPainter.bracketHighlight
private

Whether bracket highlighting is enabled.

Definition at line 140 of file TextAreaPainter.java.

Referenced by net.sf.gridarta.textedit.textarea.TextAreaPainter.isBracketHighlightEnabled().

◆ bracketHighlightColor

final Color net.sf.gridarta.textedit.textarea.TextAreaPainter.bracketHighlightColor
private

The color for bracket highlighting.

Definition at line 134 of file TextAreaPainter.java.

◆ brackets

final TextAreaBrackets net.sf.gridarta.textedit.textarea.TextAreaPainter.brackets
private

The brackets to paint.

Definition at line 75 of file TextAreaPainter.java.

Referenced by net.sf.gridarta.textedit.textarea.TextAreaPainter.TextAreaPainter().

◆ caret

final TextAreaCaret net.sf.gridarta.textedit.textarea.TextAreaPainter.caret
private

◆ caretColor

final Color net.sf.gridarta.textedit.textarea.TextAreaPainter.caretColor
private

The caret color.

Definition at line 110 of file TextAreaPainter.java.

◆ cols

final int net.sf.gridarta.textedit.textarea.TextAreaPainter.cols
private

The number of columns.

Use to calculate the component's width.

Definition at line 98 of file TextAreaPainter.java.

◆ config

final TextAreaConfig net.sf.gridarta.textedit.textarea.TextAreaPainter.config
private

◆ currentLine

final Segment net.sf.gridarta.textedit.textarea.TextAreaPainter.currentLine = new Segment()
private

Holds the currently painted line.

Definition at line 177 of file TextAreaPainter.java.

◆ currentLineIndex

int net.sf.gridarta.textedit.textarea.TextAreaPainter.currentLineIndex = -1
private

The currently painted line.

Definition at line 165 of file TextAreaPainter.java.

Referenced by net.sf.gridarta.textedit.textarea.TextAreaPainter.getCurrentLineIndex().

◆ currentLineTokens

List<Token> net.sf.gridarta.textedit.textarea.TextAreaPainter.currentLineTokens
private

The tokens of the currently painted line.

Definition at line 171 of file TextAreaPainter.java.

◆ defaultCharWidth

int net.sf.gridarta.textedit.textarea.TextAreaPainter.defaultCharWidth
private

The character width of defaultFont.

Unset if

.

Definition at line 213 of file TextAreaPainter.java.

Referenced by net.sf.gridarta.textedit.textarea.TextAreaPainter.getDefaultCharWidth().

◆ defaultFont

Font net.sf.gridarta.textedit.textarea.TextAreaPainter.defaultFont
private

The Font from which defaultLineHeight and defaultCharWidth have been calculated.

Set to

null

it not yet calculated.

Definition at line 199 of file TextAreaPainter.java.

◆ defaultLineHeight

int net.sf.gridarta.textedit.textarea.TextAreaPainter.defaultLineHeight
private

The line height of defaultFont.

Unset if

.

Definition at line 206 of file TextAreaPainter.java.

Referenced by net.sf.gridarta.textedit.textarea.TextAreaPainter.getDefaultLineHeight().

◆ eolMarkerColor

final Color net.sf.gridarta.textedit.textarea.TextAreaPainter.eolMarkerColor
private

The color for painting eol markers.

Definition at line 153 of file TextAreaPainter.java.

◆ eolMarkers

final boolean net.sf.gridarta.textedit.textarea.TextAreaPainter.eolMarkers
private

Whether end of line markers should be painted.

Definition at line 159 of file TextAreaPainter.java.

◆ firstLine

◆ fontMetrics

◆ fontRenderContext

final FontRenderContext net.sf.gridarta.textedit.textarea.TextAreaPainter.fontRenderContext = new FontRenderContext(null, false, false)
private

The font render context for this instance.

Definition at line 57 of file TextAreaPainter.java.

◆ horizontalOffset

◆ lineHighlight

final boolean net.sf.gridarta.textedit.textarea.TextAreaPainter.lineHighlight
private

Whether line highlighting is enabled.

Definition at line 128 of file TextAreaPainter.java.

◆ lineHighlightColor

final Color net.sf.gridarta.textedit.textarea.TextAreaPainter.lineHighlightColor
private

The color for line highlighting.

Definition at line 122 of file TextAreaPainter.java.

◆ lineSegment

final Segment net.sf.gridarta.textedit.textarea.TextAreaPainter.lineSegment = new Segment()
private

Definition at line 222 of file TextAreaPainter.java.

◆ LOG

final Category net.sf.gridarta.textedit.textarea.TextAreaPainter.LOG = Logger.getLogger(TextAreaPainter.class)
staticprivate

The Logger for printing log messages.

Definition at line 47 of file TextAreaPainter.java.

◆ paintInvalid

final boolean net.sf.gridarta.textedit.textarea.TextAreaPainter.paintInvalid
private

Whether invalid lines should be painted as red tildes.

Definition at line 146 of file TextAreaPainter.java.

Referenced by net.sf.gridarta.textedit.textarea.TextAreaPainter.TextAreaPainter().

◆ rows

final int net.sf.gridarta.textedit.textarea.TextAreaPainter.rows
private

The number of rows.

Use to calculate the component's height.

Definition at line 104 of file TextAreaPainter.java.

◆ selection

final TextAreaSelection net.sf.gridarta.textedit.textarea.TextAreaPainter.selection
private

◆ selectionColor

final Color net.sf.gridarta.textedit.textarea.TextAreaPainter.selectionColor
private

The selection color.

Definition at line 116 of file TextAreaPainter.java.

◆ serialVersionUID

final long net.sf.gridarta.textedit.textarea.TextAreaPainter.serialVersionUID = 1L
staticprivate

The serial version UID.

Definition at line 52 of file TextAreaPainter.java.

◆ styles

SyntaxStyles net.sf.gridarta.textedit.textarea.TextAreaPainter.styles
private

The syntax styles used to paint colorized text.

Definition at line 92 of file TextAreaPainter.java.

Referenced by net.sf.gridarta.textedit.textarea.TextAreaPainter.getStyles(), and net.sf.gridarta.textedit.textarea.TextAreaPainter.setStyles().

◆ tabSize

int net.sf.gridarta.textedit.textarea.TextAreaPainter.tabSize
private

The tab size in pixels.

Definition at line 183 of file TextAreaPainter.java.

Referenced by net.sf.gridarta.textedit.textarea.TextAreaPainter.nextTabStop().

◆ textArea

final JEditTextArea net.sf.gridarta.textedit.textarea.TextAreaPainter.textArea
private

The associated text area that is painted.

Definition at line 63 of file TextAreaPainter.java.

Referenced by net.sf.gridarta.textedit.textarea.TextAreaPainter.TextAreaPainter().

◆ visibleLines

int net.sf.gridarta.textedit.textarea.TextAreaPainter.visibleLines
private

The documentation for this class was generated from the following file: