|
JHotDraw 7.0.9 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jhotdraw.draw.AbstractLineDecoration
public abstract class AbstractLineDecoration
An standard implementation of a line decoration. It draws a shape which is rotated and moved to the end of the line. The shape is scaled by the stroke width.
Constructor Summary | |
---|---|
AbstractLineDecoration(boolean isFilled,
boolean isStroked,
boolean isSolid)
Constructs an arrow tip with the given angle and radius. |
Method Summary | |
---|---|
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.GeneralPath |
getDecoratorPath(Figure f)
Hook method to calculates the path of the decorator. |
protected abstract double |
getDecoratorPathRadius(Figure f)
Hook method to calculates 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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractLineDecoration(boolean isFilled, boolean isStroked, boolean isSolid)
Method Detail |
---|
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.GeneralPath getDecoratorPath(Figure f)
protected abstract double getDecoratorPathRadius(Figure f)
|
Copyright 1996-2007 (c) JHotDraw.org. Some rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |