JHotDraw 7rev733

org.jhotdraw.draw.decoration
Class ArrowTip

java.lang.Object
  extended by org.jhotdraw.draw.decoration.AbstractLineDecoration
      extended by org.jhotdraw.draw.decoration.ArrowTip
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, LineDecoration, DOMStorable

public class ArrowTip
extends AbstractLineDecoration
implements DOMStorable

A LineDecoration which can draws an arrow tip.

The shape of the arrow can be controlled with three parameters:

Version:
$Id: ArrowTip.java 750 2011-08-28 09:51:17Z rawcoder $
Author:
Werner Randelshofer
See Also:
Serialized Form

Constructor Summary
ArrowTip()
           
ArrowTip(double angle, double outerRadius, double innerRadius)
          Constructs an arrow tip with the specified angle and outer and inner radius.
ArrowTip(double angle, double outerRadius, double innerRadius, boolean isFilled, boolean isStroked, boolean isSolid)
          Constructs an arrow tip with the specified parameters.
 
Method Summary
 double getAngle()
           
protected  java.awt.geom.Path2D.Double getDecoratorPath(Figure f)
          Hook method to calculate the path of the decorator.
protected  double getDecoratorPathRadius(Figure f)
          Hook method to calculate the radius of the decorator path.
 double getInnerRadius()
           
 double getOuterRadius()
           
 void read(DOMInput in)
           
 void write(DOMOutput out)
           
 
Methods inherited from class org.jhotdraw.draw.decoration.AbstractLineDecoration
draw, getDecorationRadius, getDrawingArea, isFilled, isSolid, isStroked, setFilled, setSolid, setStroked
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrowTip

public ArrowTip()

ArrowTip

public ArrowTip(double angle,
                double outerRadius,
                double innerRadius)
Constructs an arrow tip with the specified angle and outer and inner radius.


ArrowTip

public ArrowTip(double angle,
                double outerRadius,
                double innerRadius,
                boolean isFilled,
                boolean isStroked,
                boolean isSolid)
Constructs an arrow tip with the specified parameters.

Method Detail

getDecoratorPath

protected java.awt.geom.Path2D.Double getDecoratorPath(Figure f)
Description copied from class: AbstractLineDecoration
Hook method to calculate the path of the decorator.

Specified by:
getDecoratorPath in class AbstractLineDecoration

getDecoratorPathRadius

protected double getDecoratorPathRadius(Figure f)
Description copied from class: AbstractLineDecoration
Hook method to calculate the radius of the decorator path.

Specified by:
getDecoratorPathRadius in class AbstractLineDecoration

getAngle

public double getAngle()

getInnerRadius

public double getInnerRadius()

getOuterRadius

public double getOuterRadius()

read

public void read(DOMInput in)
Specified by:
read in interface DOMStorable

write

public void write(DOMOutput out)
Specified by:
write in interface DOMStorable

Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.