Class SmartHighlightPainter

All Implemented Interfaces:
Serializable, Highlighter.HighlightPainter

public class SmartHighlightPainter extends ChangeableHighlightPainter
A "smart" highlight painter designed for use in RSyntaxTextArea. Adds the following features:
  • Rendered highlights don't "grow" when users append text to the "end" of them. This is implemented by assuming that the highlights themselves specify their end offset as one offset "too short". This behavior is baked into various RSTA highlights (mark all, mark occurrences, etc.).
  • Ability to paint a border line around highlights.
Version:
1.0
See Also:
  • Field Details

    • DEFAULT_HIGHLIGHT_COLOR

      public static final Color DEFAULT_HIGHLIGHT_COLOR
      The default highlight color.
    • borderColor

      private Color borderColor
    • paintBorder

      private boolean paintBorder
  • Constructor Details

    • SmartHighlightPainter

      public SmartHighlightPainter()
      Creates a highlight painter using a default color.
    • SmartHighlightPainter

      public SmartHighlightPainter(Paint paint)
      Constructor.
      Parameters:
      paint - The color or paint to use for this painter.
  • Method Details