Class Highlight


  • public class Highlight
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Highlight​(int start, int end, java.awt.Color color)
      Constructs a new Highlight that indicates where to highlight text in the listing fields.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.Color getColor()
      Returns the color to use as the background highlight color.
      int getEnd()
      Returns the ending position (inclusive) of the highlight.
      int getStart()
      Returns the starting position of the highlight.
      void setOffset​(int newOffset)
      Sets the offset of this highlights start and end values.
      • Methods inherited from class java.lang.Object

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

      • Highlight

        public Highlight​(int start,
                         int end,
                         java.awt.Color color)
        Constructs a new Highlight that indicates where to highlight text in the listing fields.
        Parameters:
        start - the starting character position to highlight
        end - the ending character position (inclusive) to highlight
        color - the color to use for highlighting.
    • Method Detail

      • getStart

        public int getStart()
        Returns the starting position of the highlight.
      • getEnd

        public int getEnd()
        Returns the ending position (inclusive) of the highlight.
      • getColor

        public java.awt.Color getColor()
        Returns the color to use as the background highlight color.
      • setOffset

        public void setOffset​(int newOffset)
        Sets the offset of this highlights start and end values. The effect of the offset is that calls to getStart() and getEnd() will return their values with the offset added.
        Parameters:
        newOffset - The new offset into this highlight.