|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.text.LayeredHighlighter.LayerPainter org.fife.ui.rtextarea.ChangeableHighlightPainter org.fife.ui.rtextarea.SmartHighlightPainter
public class SmartHighlightPainter
A "smart" highlight painter designed for use in RSyntaxTextArea. Adds the following features:
Constructor Summary | |
---|---|
SmartHighlightPainter()
Creates a highlight painter that defaults to blue. |
|
SmartHighlightPainter(java.awt.Paint paint)
Constructor. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.fife.ui.rtextarea.ChangeableHighlightPainter |
---|
getAlpha, getPaint, getRoundedEdges, paint, setAlpha, setRoundedEdges |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SmartHighlightPainter()
public SmartHighlightPainter(java.awt.Paint paint)
paint
- The color or paint to use for this painter.Method Detail |
---|
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 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 for
public void setPaint(java.awt.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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |