public class SmartHighlightPainter extends ChangeableHighlightPainter
Constructor and Description |
---|
SmartHighlightPainter()
Creates a highlight painter that defaults to blue.
|
SmartHighlightPainter(Paint paint)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getPaintBorder()
Returns whether a border is painted around marked occurrences.
|
Shape |
paintLayer(Graphics g,
int p0,
int p1,
Shape viewBounds,
JTextComponent c,
View view)
Paints a portion of a highlight.
|
void |
setPaint(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(Paint paint)
paint
- The color or paint to use for this painter.public boolean getPaintBorder()
setPaintBorder(boolean)
,
ChangeableHighlightPainter.getPaint()
public Shape paintLayer(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent c, View view)
paintLayer
in class 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(Paint paint)
Paint
(usually a java.awt.Color
)
used to paint this highlight.setPaint
in class ChangeableHighlightPainter
paint
- The new Paint
.ChangeableHighlightPainter.getPaint()
public void setPaintBorder(boolean paint)
paint
- Whether to paint a border.getPaintBorder()
,
setPaint(Paint)
Copyright © 2003–2015. All rights reserved.