Home » openjdk-7 » javax » swing » text » [javadoc | source]
javax.swing.text
public interface: Highlighter [javadoc | source]

All Known Implementing Classes:
    DefaultHighlighter, BasicHighlighter, LayeredHighlighter

An interface for an object that allows one to mark up the background with colored areas.
Nested Class Summary:
public interface  Highlighter.HighlightPainter  Highlight renderer. 
public interface  Highlighter.Highlight   
Method from javax.swing.text.Highlighter Summary:
addHighlight,   changeHighlight,   deinstall,   getHighlights,   install,   paint,   removeAllHighlights,   removeHighlight
Method from javax.swing.text.Highlighter Detail:
 public Object addHighlight(int p0,
    int p1,
    HighlightPainter p) throws BadLocationException
    Adds a highlight to the view. Returns a tag that can be used to refer to the highlight.
 public  void changeHighlight(Object tag,
    int p0,
    int p1) throws BadLocationException
    Changes the given highlight to span a different portion of the document. This may be more efficient than a remove/add when a selection is expanding/shrinking (such as a sweep with a mouse) by damaging only what changed.
 public  void deinstall(JTextComponent c)
    Called when the UI is being removed from the interface of a JTextComponent. This is used to unregister any listeners that were attached.
 public Highlight[] getHighlights()
    Fetches the current list of highlights.
 public  void install(JTextComponent c)
    Called when the UI is being installed into the interface of a JTextComponent. This can be used to gain access to the model that is being navigated by the implementation of this interface.
 public  void paint(Graphics g)
    Renders the highlights.
 public  void removeAllHighlights()
    Removes all highlights this highlighter is responsible for.
 public  void removeHighlight(Object tag)
    Removes a highlight from the view.