javax.swing.text
Class DefaultHighlighter
java.lang.Object
javax.swing.text.LayeredHighlighter
javax.swing.text.DefaultHighlighter
- All Implemented Interfaces:
- Highlighter
- Direct Known Subclasses:
- BasicTextUI.BasicHighlighter
public class DefaultHighlighter
- extends LayeredHighlighter
The default highlight for Swing text components. It highlights text
by filling the background with a rectangle.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultPainter
public static final LayeredHighlighter.LayerPainter DefaultPainter
DefaultHighlighter
public DefaultHighlighter()
getDrawsLayeredHighlights
public boolean getDrawsLayeredHighlights()
setDrawsLayeredHighlights
public void setDrawsLayeredHighlights(boolean newValue)
install
public void install(JTextComponent c)
deinstall
public void deinstall(JTextComponent c)
addHighlight
public Object addHighlight(int p0,
int p1,
Highlighter.HighlightPainter painter)
throws BadLocationException
- Throws:
BadLocationException
removeHighlight
public void removeHighlight(Object tag)
removeAllHighlights
public void removeAllHighlights()
getHighlights
public Highlighter.Highlight[] getHighlights()
changeHighlight
public void changeHighlight(Object tag,
int n0,
int n1)
throws BadLocationException
- Throws:
BadLocationException
paintLayeredHighlights
public void paintLayeredHighlights(Graphics g,
int p0,
int p1,
Shape viewBounds,
JTextComponent editor,
View view)
- Specified by:
paintLayeredHighlights
in class LayeredHighlighter
paint
public void paint(Graphics g)