Package groovy.console.ui.text

# Class MatchingHighlighter

java.lang.Object
groovy.console.ui.text.MatchingHighlighter

All Implemented Interfaces:
  `EventListener`, `CaretListener`

public class MatchingHighlighter extends Object implements CaretListener
Represents highlighter to highlight matched parentheses, brackets and curly braces when caret touching them

Since:
  3.0.0

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MatchingHighlighter(SmartDocumentFilter smartDocumentFilter, JTextPane textEditor)`
  Creates a highlighter bound to the supplied document filter and editor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `caretUpdate(CaretEvent e)`
  `void`
  `highlight()`
  Schedules highlighting for the delimiter nearest the caret.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### MatchingHighlighter

    public MatchingHighlighter(SmartDocumentFilter smartDocumentFilter, JTextPane textEditor)
    Creates a highlighter bound to the supplied document filter and editor.
    Parameters:
      `smartDocumentFilter` - the token source used to find matching delimiters
      `textEditor` - the text pane whose delimiters are highlighted

- ## Method Details

  - ### caretUpdate

    public void caretUpdate(CaretEvent e)
    Specified by:
      `caretUpdate` in interface `CaretListener`

  - ### highlight

    public void highlight()
    Schedules highlighting for the delimiter nearest the caret.