com.wordpress.tipsforjava.swing
[Java] Class RectanglePainter
java.lang.Object
javax.swing.text.LayeredHighlighter.LayerPainter
javax.swing.text.DefaultHighlighter.DefaultHighlightPainter
com.wordpress.tipsforjava.swing.RectanglePainter
public class RectanglePainter
extends DefaultHighlighter.DefaultHighlightPainter
Implements a simple highlight painter that renders a rectangle around the
area to be highlighted.
- Authors:
- Rob Camick
- Darryl Burke
|
Methods inherited from class DefaultHighlighter.DefaultHighlightPainter
|
| paint, getColor, paintLayer, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
|
Methods inherited from class LayeredHighlighter.LayerPainter
|
| paintLayer, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll, paint |
RectanglePainter
public RectanglePainter(Color color)
-
getDrawingArea
private Rectangle getDrawingArea(int offs0, int offs1, Shape bounds, View view)
-
paintLayer
public Shape paintLayer(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c, View view)
- Paints a portion of a highlight.
- Parameters:
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 for
- Returns:
- region drawing occured in
Groovy Documentation