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

Maintains information about the highlighted pairs of brackets. More...

+ Collaboration diagram for net.sf.gridarta.textedit.textarea.TextAreaBrackets:

Public Member Functions

void clear ()
 Clears the highlighted bracket. More...
 
int getBracketLine ()
 Returns the line of the highlighted bracket (the bracket matching the one before the caret). More...
 
int getBracketPosition ()
 Returns the position of the highlighted bracket (the bracket matching the one before the caret). More...
 
void set (final int bracketPosition, final int bracketLine)
 Sets the highlighted bracket. More...
 

Private Attributes

int bracketLine = -1
 The position of the highlighted bracket (in lines). More...
 
int bracketPosition = -1
 The position of the highlighted bracket (in characters). More...
 

Detailed Description

Maintains information about the highlighted pairs of brackets.

Definition at line 25 of file TextAreaBrackets.java.

Member Function Documentation

◆ clear()

void net.sf.gridarta.textedit.textarea.TextAreaBrackets.clear ( )

Clears the highlighted bracket.

Definition at line 59 of file TextAreaBrackets.java.

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

+ Here is the caller graph for this function:

◆ getBracketLine()

int net.sf.gridarta.textedit.textarea.TextAreaBrackets.getBracketLine ( )

Returns the line of the highlighted bracket (the bracket matching the one before the caret).

Returns
the position in lines or
-1
if none should be highlighted

Definition at line 52 of file TextAreaBrackets.java.

References net.sf.gridarta.textedit.textarea.TextAreaBrackets.bracketLine.

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

+ Here is the caller graph for this function:

◆ getBracketPosition()

int net.sf.gridarta.textedit.textarea.TextAreaBrackets.getBracketPosition ( )

Returns the position of the highlighted bracket (the bracket matching the one before the caret).

Returns
the position in characters or
-1
if none should be highlighted

Definition at line 43 of file TextAreaBrackets.java.

References net.sf.gridarta.textedit.textarea.TextAreaBrackets.bracketPosition.

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

+ Here is the caller graph for this function:

◆ set()

void net.sf.gridarta.textedit.textarea.TextAreaBrackets.set ( final int  bracketPosition,
final int  bracketLine 
)

Sets the highlighted bracket.

Parameters
bracketPositionthe position in characters or
-1
to clear
bracketLinethe position in lines or
-1
to clear

Definition at line 69 of file TextAreaBrackets.java.

References net.sf.gridarta.textedit.textarea.TextAreaBrackets.bracketLine, and net.sf.gridarta.textedit.textarea.TextAreaBrackets.bracketPosition.

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

+ Here is the caller graph for this function:

Member Data Documentation

◆ bracketLine

int net.sf.gridarta.textedit.textarea.TextAreaBrackets.bracketLine = -1
private

The position of the highlighted bracket (in lines).

Definition at line 35 of file TextAreaBrackets.java.

Referenced by net.sf.gridarta.textedit.textarea.TextAreaBrackets.getBracketLine(), and net.sf.gridarta.textedit.textarea.TextAreaBrackets.set().

◆ bracketPosition

int net.sf.gridarta.textedit.textarea.TextAreaBrackets.bracketPosition = -1
private

The position of the highlighted bracket (in characters).

Definition at line 30 of file TextAreaBrackets.java.

Referenced by net.sf.gridarta.textedit.textarea.TextAreaBrackets.getBracketPosition(), and net.sf.gridarta.textedit.textarea.TextAreaBrackets.set().


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