|
Java Platform 1.2 Beta 4 |
|||||||||
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
Highlighter
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 | |
Object | addHighlight(int p0,
int p1,
Highlighter.HighlightPainter p)
Adds a highlight to the view. |
void | changeHighlight(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(Graphics g)
Renders the highlights. |
void | removeAllHighlights()
Removes all highlights. |
void | removeHighlight(Object tag)
Removes a highlight from the view. |
Methods inherited from class java.lang.Object | |
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
Constructor Detail |
public DefaultHighlighter()
Method Detail |
public void paint(Graphics g)
g
- the graphics contextpublic void install(JTextComponent c)
c
- the editor componentHighlighter.install(com.sun.java.swing.text.JTextComponent)
public void deinstall(JTextComponent c)
c
- the componentHighlighter.deinstall(com.sun.java.swing.text.JTextComponent)
public 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(Object tag)
tag
- the reference to the highlightpublic void removeAllHighlights()
public void changeHighlight(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()
Highlighter.getHighlights()
|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |