| Overview | Package | Class | Tree | Deprecated | Index | Help |
Java Platform 1.1.7 |
||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||
java.lang.Object | +--com.sun.java.swing.text.DefaultHighlighter
| Inner Class Summary | |
| static | DefaultHighlighter.DefaultHighlightPainter
Simple highlight painter that fills a highlighted area with a solid color. |
| Constructor Summary | |
| DefaultHighlighter()
Creates a new DefaultHighlighther object. |
|
| Method Summary | |
| java.lang.Object | addHighlight(int p0,
int p1,
Highlighter.HighlightPainter p)
Adds a highlight to the view. |
| void | changeHighlight(java.lang.Object tag,
int p0,
int p1)
Changes a highlight. |
| void | deinstall(JTextComponent c)
Called when the UI is being removed from the interface of a JTextComponent. |
| Highlighter.Highlight[] | getHighlights()
Makes a copy of the highlights. |
| void | install(JTextComponent c)
Called when the UI is being installed into the interface of a JTextComponent. |
| void | paint(java.awt.Graphics g)
Renders the highlights. |
| void | removeAllHighlights()
Removes all highlights. |
| void | removeHighlight(java.lang.Object tag)
Removes a highlight from the view. |
| Methods inherited from class java.lang.Object | |
| clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait | |
| Constructor Detail |
public DefaultHighlighter()
| Method Detail |
public void paint(java.awt.Graphics g)
g
- the graphics contextpublic void install(JTextComponent c)
c
- the editor componentpublic void deinstall(JTextComponent c)
c
- the component
public java.lang.Object addHighlight(int p0,
int p1,
Highlighter.HighlightPainter p)
throws BadLocationException
p0
- the start offset of the range to highlight >= 0
p1
- the end offset of the range to highlight >= p0
p
- the painter to use to actually render the highlightpublic void removeHighlight(java.lang.Object tag)
tag
- the reference to the highlightpublic void removeAllHighlights()
public void changeHighlight(java.lang.Object tag,
int p0,
int p1)
throws BadLocationException
tag
- the highlight tag
p0
- the beginning of the range >= 0
p1
- the end of the range >= p0public Highlighter.Highlight[] getHighlights()
| Overview | Package | Class | Tree | Deprecated | Index | Help |
Java Platform 1.1.7 |
||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||