Class FieldHighlightFactory

  • All Implemented Interfaces:

    public class FieldHighlightFactory
    extends java.lang.Object
    implements HighlightFactory
    Wrapper class to hold field factory information in the text field to be provided to the highlightProvider to get highlights just before the field is painted.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Highlight[] getHighlights​(Field field, java.lang.String text, int cursorTextOffset)
      Returns the highlights for the given text
      • Methods inherited from class java.lang.Object

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

      • FieldHighlightFactory

        public FieldHighlightFactory​(HighlightProvider provider,
                                     java.lang.Class<? extends FieldFactory> fieldFactoryClass,
                                     java.lang.Object obj)
        Constructs a new FieldHighlightFactory.
        provider - the HighlightProvider that will actually compute the highlights.
        fieldFactoryClass - the class of the field factory that generated the field to be rendered.
        obj - the object that holds the information that will be rendered (usually a code unit)
    • Method Detail

      • getHighlights

        public Highlight[] getHighlights​(Field field,
                                         java.lang.String text,
                                         int cursorTextOffset)
        Description copied from interface: HighlightFactory
        Returns the highlights for the given text
        Specified by:
        getHighlights in interface HighlightFactory
        field - the field that is requesting the highlight
        text - the text to be considered for highlighting
        cursorTextOffset - the position in the given text of the cursor. A -1 indicates the cursor is not in this field.
        an array of highlights to be rendered