org.jhotdraw.draw.decoration
Class AbstractLineDecoration
- java.lang.Object
-
- org.jhotdraw.draw.decoration.AbstractLineDecoration
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, LineDecoration
- Direct Known Subclasses:
- ArrowTip, GeneralPathTip, PerpendicularBar
public abstract class AbstractLineDecoration extends java.lang.Object implements LineDecoration
This abstract class can be extended to implement aLineDecoration.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description AbstractLineDecoration(boolean isFilled, boolean isStroked, boolean isSolid)Constructs an arrow tip with the given angle and radius.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voiddraw(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.doublegetDecorationRadius(Figure f)Returns the radius of the decorator.java.awt.geom.Rectangle2D.DoublegetDrawingArea(Figure f, java.awt.geom.Point2D.Double p1, java.awt.geom.Point2D.Double p2)Returns the drawing area of the decorator.
-
-
-
Constructor Detail
-
AbstractLineDecoration
public AbstractLineDecoration(boolean isFilled, boolean isStroked, boolean isSolid)Constructs an arrow tip with the given angle and radius.
-
-
Method Detail
-
draw
public 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. (template method)- Specified by:
drawin interfaceLineDecoration
-
getDrawingArea
public 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.- Specified by:
getDrawingAreain interfaceLineDecoration
-
getDecorationRadius
public double getDecorationRadius(Figure f)
Description copied from interface:LineDecorationReturns the radius of the decorator. This is used to crop the end of the line, to prevent it from being drawn over the decorator.- Specified by:
getDecorationRadiusin interfaceLineDecoration
-
-
DataMelt 3.0 © DataMelt by jWork.ORG