public class SmartHighlightPainter extends ChangeableHighlightPainter
构造器和说明 |
---|
SmartHighlightPainter()
Creates a highlight painter that defaults to blue.
|
SmartHighlightPainter(java.awt.Paint paint)
Constructor.
|
限定符和类型 | 方法和说明 |
---|---|
boolean |
getPaintBorder()
Returns whether a border is painted around marked occurrences.
|
java.awt.Shape |
paintLayer(java.awt.Graphics g,
int p0,
int p1,
java.awt.Shape viewBounds,
javax.swing.text.JTextComponent c,
javax.swing.text.View view)
Paints a portion of a highlight.
|
void |
setPaint(java.awt.Paint paint)
Sets the
Paint (usually a java.awt.Color )
used to paint this highlight. |
void |
setPaintBorder(boolean paint)
Toggles whether a border is painted around highlights.
|
getAlpha, getPaint, getRoundedEdges, paint, setAlpha, setRoundedEdges
public SmartHighlightPainter()
public SmartHighlightPainter(java.awt.Paint paint)
paint
- The color or paint to use for this painter.public boolean getPaintBorder()
setPaintBorder(boolean)
,
ChangeableHighlightPainter.getPaint()
public java.awt.Shape paintLayer(java.awt.Graphics g, int p0, int p1, java.awt.Shape viewBounds, javax.swing.text.JTextComponent c, javax.swing.text.View view)
paintLayer
在类中 ChangeableHighlightPainter
g
- the graphics contextp0
- the starting model offset >= 0p1
- the ending model offset >= offs1viewBounds
- the bounding box of the view, which is not
necessarily the region to paint.c
- the editorview
- View painting forpublic void setPaint(java.awt.Paint paint)
Paint
(usually a java.awt.Color
)
used to paint this highlight.setPaint
在类中 ChangeableHighlightPainter
paint
- The new Paint
.ChangeableHighlightPainter.getPaint()
public void setPaintBorder(boolean paint)
paint
- Whether to paint a border.getPaintBorder()
,
setPaint(Paint)