public class SmartHighlightPainter extends ChangeableHighlightPainter
| Constructor and Description |
|---|
SmartHighlightPainter()
Creates a highlight painter that defaults to blue.
|
SmartHighlightPainter(java.awt.Paint paint)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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, setRoundedEdgespublic 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 in class ChangeableHighlightPainterg - 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 in class ChangeableHighlightPainterpaint - The new Paint.ChangeableHighlightPainter.getPaint()public void setPaintBorder(boolean paint)
paint - Whether to paint a border.getPaintBorder(),
setPaint(Paint)