com.wordpress.tipsforjava.swing.text
[Java] Class ProtectedHighlighter.ProtectedHighlightPainter
java.lang.Object
javax.swing.text.LayeredHighlighter.LayerPainter
javax.swing.text.DefaultHighlighter.DefaultHighlightPainter
com.wordpress.tipsforjava.swing.text.ProtectedHighlighter.ProtectedHighlightPainter
class ProtectedHighlighter.ProtectedHighlightPainter
extends DefaultHighlighter.DefaultHighlightPainter
Custom painter. Has two main functions:
a) make sure only the protected text is highlighted. This means use the
start/length information, not the start/end offset informatin
b) highlight entire lines (even when text doesn't go to the end) as
required.
|
Methods inherited from class DefaultHighlighter.DefaultHighlightPainter
|
| paint, getColor, paintLayer, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
|
Methods inherited from class LayeredHighlighter.LayerPainter
|
| paintLayer, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll, paint |
component
private JTextComponent component
-
lastLine
private int lastLine
-
ProtectedHighlighter.ProtectedHighlightPainter
public ProtectedHighlighter.ProtectedHighlightPainter(JTextComponent component, Color color)
-
getOffs1
private int getOffs1(int offs0, int offs1)
-
paint
public void paint(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c)
-
Groovy Documentation