Class TextAreaBrackets


  • public class TextAreaBrackets
    extends java.lang.Object
    Maintains information about the highlighted pairs of brackets.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()
      Clears the highlighted bracket.
      int getBracketLine()
      Returns the line of the highlighted bracket (the bracket matching the one before the caret).
      int getBracketPosition()
      Returns the position of the highlighted bracket (the bracket matching the one before the caret).
      void set​(int bracketPosition, int bracketLine)
      Sets the highlighted bracket.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TextAreaBrackets

        public TextAreaBrackets()
    • Method Detail

      • getBracketPosition

        public int 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
      • getBracketLine

        public int 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
      • clear

        public void clear()
        Clears the highlighted bracket.
      • set

        public void set​(int bracketPosition,
                        int bracketLine)
        Sets the highlighted bracket.
        Parameters:
        bracketPosition - the position in characters or -1 to clear
        bracketLine - the position in lines or -1 to clear