|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.util.java2d.AbstractPaintedGraphic
public abstract class AbstractPaintedGraphic
An abstract implementation of the PaintedGraphic interface. This class implements the common elements of the PaintedGraphic abstraction.
Field Summary | |
---|---|
private static java.awt.BasicStroke[] |
_strokes
A static array of cached strokes |
java.awt.Shape |
shape
The shape being painted. |
java.awt.Stroke |
stroke
The stroke. |
java.awt.Paint |
strokePaint
The stroke paint. |
Constructor Summary | |
---|---|
AbstractPaintedGraphic()
|
Method Summary | |
---|---|
java.awt.geom.Rectangle2D |
getBounds()
Get the bounding box of the shape when stroked. |
abstract float |
getLineWidth()
Get the line width. |
java.awt.Stroke |
getStroke()
Get the stroke. |
static java.awt.BasicStroke |
getStroke(float floatwidth)
Get a new stroke of the given width and with no dashing. |
static java.awt.BasicStroke |
getStroke(int width)
Get a new stroke of the given width and with no dashing. |
abstract boolean |
hit(java.awt.geom.Rectangle2D r)
Test if this shape intersects the given rectangle. |
abstract void |
setLineWidth(float lineWidth)
Set the line width. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface diva.util.java2d.PaintedGraphic |
---|
intersects |
Methods inherited from interface diva.util.java2d.PaintedObject |
---|
paint |
Field Detail |
---|
public java.awt.Stroke stroke
public java.awt.Shape shape
public java.awt.Paint strokePaint
private static java.awt.BasicStroke[] _strokes
Constructor Detail |
---|
public AbstractPaintedGraphic()
Method Detail |
---|
public abstract float getLineWidth()
getLineWidth
in interface PaintedGraphic
public java.awt.geom.Rectangle2D getBounds()
getBounds
in interface PaintedObject
public java.awt.Stroke getStroke()
getStroke
in interface PaintedGraphic
public static java.awt.BasicStroke getStroke(int width)
public static java.awt.BasicStroke getStroke(float floatwidth)
public abstract boolean hit(java.awt.geom.Rectangle2D r)
hit
in interface PaintedGraphic
public abstract void setLineWidth(float lineWidth)
setLineWidth
in interface PaintedGraphic
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |