public interface Highlighter
Modifier and Type | Interface and Description |
---|---|
static interface |
Highlighter.Highlight |
static interface |
Highlighter.HighlightPainter
Highlight renderer.
|
Modifier and Type | Method and Description |
---|---|
Object |
addHighlight(int p0,
int p1,
Highlighter.HighlightPainter p)
Adds a highlight to the view.
|
void |
changeHighlight(Object tag,
int p0,
int p1)
Changes the given highlight to span a different portion of
the document.
|
void |
deinstall(JTextComponent c)
Called when the UI is being removed from the
interface of a JTextComponent.
|
Highlighter.Highlight[] |
getHighlights()
Fetches the current list of highlights.
|
void |
install(JTextComponent c)
Called when the UI is being installed into the
interface of a JTextComponent.
|
void |
paint(Graphics g)
Renders the highlights.
|
void |
removeAllHighlights()
Removes all highlights this highlighter is responsible for.
|
void |
removeHighlight(Object tag)
Removes a highlight from the view.
|
void install(JTextComponent c)
c
- the JTextComponent editorvoid deinstall(JTextComponent c)
c
- the JTextComponent editorvoid paint(Graphics g)
g
- the graphics context.Object addHighlight(int p0, int p1, Highlighter.HighlightPainter p) throws BadLocationException
BadLocationException
- for an invalid range specificationp0
- the beginning of the range >= 0p1
- the end of the range >= p0p
- the painter to use for the actual highlightingvoid removeHighlight(Object tag)
tag
- which highlight to removevoid removeAllHighlights()
void changeHighlight(Object tag, int p0, int p1) throws BadLocationException
BadLocationException
- for an invalid range specificationtag
- which highlight to changep0
- the beginning of the range >= 0p1
- the end of the range >= p0Highlighter.Highlight[] getHighlights()
aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2019 aicas GmbH. All Rights Reserved.