com.horstmann.violet
Class ArrowHead
java.lang.Object
com.horstmann.violet.framework.SerializableEnumeration
com.horstmann.violet.ArrowHead
- All Implemented Interfaces:
- java.io.Serializable
public class ArrowHead
- extends SerializableEnumeration
This class defines arrowheads of various shapes.
- See Also:
- Serialized Form
Method Summary |
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Point2D p,
java.awt.geom.Point2D q)
Draws the arrowhead. |
java.awt.geom.GeneralPath |
getPath(java.awt.geom.Point2D p,
java.awt.geom.Point2D q)
Gets the path of the arrowhead |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NONE
public static final ArrowHead NONE
TRIANGLE
public static final ArrowHead TRIANGLE
BLACK_TRIANGLE
public static final ArrowHead BLACK_TRIANGLE
V
public static final ArrowHead V
HALF_V
public static final ArrowHead HALF_V
DIAMOND
public static final ArrowHead DIAMOND
BLACK_DIAMOND
public static final ArrowHead BLACK_DIAMOND
draw
public void draw(java.awt.Graphics2D g2,
java.awt.geom.Point2D p,
java.awt.geom.Point2D q)
- Draws the arrowhead.
- Parameters:
g2
- the graphics contextp
- a point on the axis of the arrow headq
- the end point of the arrow head
getPath
public java.awt.geom.GeneralPath getPath(java.awt.geom.Point2D p,
java.awt.geom.Point2D q)
- Gets the path of the arrowhead
- Parameters:
p
- a point on the axis of the arrow headq
- the end point of the arrow head
- Returns:
- the path