public abstract class AbstractLineDecoration extends java.lang.Object implements LineDecoration
LineDecoration
.Constructor and Description |
---|
AbstractLineDecoration(boolean isFilled,
boolean isStroked,
boolean isSolid)
Constructs an arrow tip with the given angle and radius.
|
Modifier and Type | Method and Description |
---|---|
void |
draw(java.awt.Graphics2D g,
Figure f,
java.awt.geom.Point2D.Double p1,
java.awt.geom.Point2D.Double p2)
Draws the arrow tip in the direction specified by the given two
Points.
|
double |
getDecorationRadius(Figure f)
Returns the radius of the decorator.
|
protected abstract java.awt.geom.Path2D.Double |
getDecoratorPath(Figure f)
Hook method to calculate the path of the decorator.
|
protected abstract double |
getDecoratorPathRadius(Figure f)
Hook method to calculate the radius of the decorator path.
|
java.awt.geom.Rectangle2D.Double |
getDrawingArea(Figure f,
java.awt.geom.Point2D.Double p1,
java.awt.geom.Point2D.Double p2)
Returns the drawing area of the decorator.
|
protected boolean |
isFilled() |
protected boolean |
isSolid() |
protected boolean |
isStroked() |
protected void |
setFilled(boolean b) |
protected void |
setSolid(boolean b) |
protected void |
setStroked(boolean b) |
public AbstractLineDecoration(boolean isFilled, boolean isStroked, boolean isSolid)
protected boolean isFilled()
protected boolean isStroked()
protected boolean isSolid()
public void draw(java.awt.Graphics2D g, Figure f, java.awt.geom.Point2D.Double p1, java.awt.geom.Point2D.Double p2)
draw
in interface LineDecoration
public java.awt.geom.Rectangle2D.Double getDrawingArea(Figure f, java.awt.geom.Point2D.Double p1, java.awt.geom.Point2D.Double p2)
getDrawingArea
in interface LineDecoration
public double getDecorationRadius(Figure f)
LineDecoration
getDecorationRadius
in interface LineDecoration
protected void setFilled(boolean b)
protected void setStroked(boolean b)
protected void setSolid(boolean b)
protected abstract java.awt.geom.Path2D.Double getDecoratorPath(Figure f)
protected abstract double getDecoratorPathRadius(Figure f)