public interface Highlighter
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Highlighter
|
static interface |
Highlighter
Highlight renderer.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
addHighlight(int p0, int p1, Highlighter
Adds a highlight to the view.
|
void |
changeHighlight(Object
Changes the given highlight to span a different portion of the document.
|
void |
deinstall(JTextComponent
Called when the UI is being removed from the interface of a JTextComponent.
|
Highlighter |
getHighlights()
Fetches the current list of highlights.
|
void |
install(JTextComponent
Called when the UI is being installed into the interface of a JTextComponent.
|
void |
paint(Graphics
Renders the highlights.
|
void |
removeAllHighlights()
Removes all highlights this highlighter is responsible for.
|
void |
removeHighlight(Object
Removes a highlight from the view.
|
void install(JTextComponentc)
c - the JTextComponent editor
void deinstall(JTextComponentc)
c - the JTextComponent editor
void paint(Graphicsg)
g - the graphics context.
ObjectaddHighlight(int p0, int p1, Highlighter .HighlightPainter p) throws BadLocationException
p0 - the beginning of the range >= 0
p1 - the end of the range >= p0
p - the painter to use for the actual highlighting
BadLocationException - for an invalid range specification
void removeHighlight(Objecttag)
tag - which highlight to remove
void removeAllHighlights()
void changeHighlight(Objecttag, int p0, int p1) throws BadLocationException
tag - which highlight to change
p0 - the beginning of the range >= 0
p1 - the end of the range >= p0
BadLocationException - for an invalid range specification
Highlighter.Highlight [] getHighlights()