public class SquiggleUnderlineHighlightPainter extends ChangeableHighlightPainter
This class must be used as a LayerPainter
.
构造器和说明 |
---|
SquiggleUnderlineHighlightPainter(java.awt.Color color)
Constructor.
|
限定符和类型 | 方法和说明 |
---|---|
java.awt.Shape |
paintLayer(java.awt.Graphics g,
int offs0,
int offs1,
java.awt.Shape bounds,
javax.swing.text.JTextComponent c,
javax.swing.text.View view)
Paints a portion of a highlight.
|
protected void |
paintSquiggle(java.awt.Graphics g,
java.awt.Rectangle r)
Paints a squiggle underneath text in the specified rectangle.
|
getAlpha, getPaint, getRoundedEdges, paint, setAlpha, setPaint, setRoundedEdges
public SquiggleUnderlineHighlightPainter(java.awt.Color color)
color
- The color of the squiggle. This cannot be
null
.public java.awt.Shape paintLayer(java.awt.Graphics g, int offs0, int offs1, java.awt.Shape bounds, javax.swing.text.JTextComponent c, javax.swing.text.View view)
paintLayer
在类中 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 forprotected void paintSquiggle(java.awt.Graphics g, java.awt.Rectangle r)
g
- The graphics context with which to paint.r
- The rectangle containing the text.