|
JavaTM 2 Platform Std. Ed. v1.4.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interface for an object that allows one to mark up the background with colored areas.
Nested Class Summary | |
static interface |
Highlighter.Highlight
|
static interface |
Highlighter.HighlightPainter
Highlight renderer. |
Method Summary | |
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. |
Method Detail |
public void install(JTextComponent c)
c
- the JTextComponent editorpublic void deinstall(JTextComponent c)
c
- the JTextComponent editorpublic void paint(Graphics g)
g
- the graphics context.public Object addHighlight(int p0, int p1, Highlighter.HighlightPainter p) throws BadLocationException
p0
- the beginning of the range >= 0p1
- the end of the range >= p0p
- the painter to use for the actual highlighting
BadLocationException
- for an invalid range specificationpublic void removeHighlight(Object tag)
tag
- which highlight to removepublic void removeAllHighlights()
public void changeHighlight(Object tag, int p0, int p1) throws BadLocationException
tag
- which highlight to changep0
- the beginning of the range >= 0p1
- the end of the range >= p0
BadLocationException
- for an invalid range specificationpublic Highlighter.Highlight[] getHighlights()
|
JavaTM 2 Platform Std. Ed. v1.4.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.