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.
-
add(Range, Color)
- Add a highlight to the view.
-
change(int, Range)
- Change the given highlight to span a different portion of
the document.
-
deinstall(JTextComponent)
- Called when the UI is being removed from the
interface of a JTextComponent.
-
install(JTextComponent)
- Called when the UI is being installed into the
interface of a JTextComponent.
-
remove(int)
- Remove a highlight from the view.
-
removeAll()
- Remove all highlights this highlighter is responsible for.
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.
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.
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
remove
public abstract void remove(int tag)
- Remove a highlight from the view.
- Parameters:
- tag - which highlight to remove.
removeAll
public abstract void removeAll()
- Remove all highlights this highlighter is responsible for.
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