public class SquiggleUnderlineHighlightPainter extends ChangeableHighlightPainter
This class must be used as a LayerPainter
.
Constructor and Description |
---|
SquiggleUnderlineHighlightPainter(Color color)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Shape |
paintLayer(Graphics g,
int offs0,
int offs1,
Shape bounds,
JTextComponent c,
View view)
Paints a portion of a highlight.
|
protected void |
paintSquiggle(Graphics g,
Rectangle r)
Paints a squiggle underneath text in the specified rectangle.
|
getAlpha, getPaint, getRoundedEdges, paint, setAlpha, setPaint, setRoundedEdges
public SquiggleUnderlineHighlightPainter(Color color)
color
- The color of the squiggle. This cannot be
null
.public Shape paintLayer(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c, View view)
paintLayer
in class ChangeableHighlightPainter
g
- the graphics contextoffs0
- the starting model offset >= 0offs1
- the ending model offset >= offs1bounds
- the bounding box of the view, which is not
necessarily the region to paint.c
- the editorview
- View painting forCopyright © 2003–2015. All rights reserved.