All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface com.sun.java.swing.text.Highlighter

public interface Highlighter
An interface for an object that allows one to mark up the background with colored areas.


Method Index

 o add(Range, Color)
Add a highlight to the view.
 o change(int, Range)
Change the given highlight to span a different portion of the document.
 o deinstall(JTextComponent)
Called when the UI is being removed from the interface of a JTextComponent.
 o install(JTextComponent)
Called when the UI is being installed into the interface of a JTextComponent.
 o remove(int)
Remove a highlight from the view.
 o removeAll()
Remove all highlights this highlighter is responsible for.

Methods

 o install
 public abstract 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.

 o deinstall
 public abstract 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.

 o add
 public abstract int add(Range rng,
                         Color c)
Add a highlight to the view. Returns a tag that can be used to refer to the highlight.

Parameters:
rng - portion of the subject to highlight.
c - color to make the highlight
 o remove
 public abstract void remove(int tag)
Remove a highlight from the view.

Parameters:
tag - which highlight to remove.
 o removeAll
 public abstract void removeAll()
Remove all highlights this highlighter is responsible for.

 o change
 public abstract void change(int tag,
                             Range rng)
Change 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.

Parameters:
tag - which hightlight to change
rng - new area of responsibility.

All Packages  Class Hierarchy  This Package  Previous  Next  Index