|
JHotDraw 7.6 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jhotdraw.draw.decoration.AbstractLineDecoration
public abstract class AbstractLineDecoration
This abstract class can be extended to implement a LineDecoration
.
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.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)
|
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.Path2D.Double getDecoratorPath(Figure f)
protected abstract double getDecoratorPathRadius(Figure f)
|
Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project. Some rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |