edu.uci.ics.jung.visualization.contrib
Class Arrow
java.lang.Object
edu.uci.ics.jung.visualization.contrib.Arrow
public class Arrow
- extends Object
This pluggable utility paints either a "classic" or a "sleek" filled arrow
on a given edge. To use, create an instance of the Arrow object
with your preferred thickness, and then call
arrow.drawArrow( graphics, source_x1, source_y1, dest_x, dest_y2 ) for the edge.
Note that the arrow simply uses the color currently set in the graphics context.
- Author:
- Jon Froehlich
Constructor Summary |
Arrow(String type,
int length,
int width)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CLASSIC
public static final String CLASSIC
- See Also:
- Constant Field Values
SLEEK
public static final String SLEEK
- See Also:
- Constant Field Values
m_arrowType
protected String m_arrowType
m_arrowLength
protected int m_arrowLength
m_arrowWidth
protected int m_arrowWidth
m_arrowStroke
protected Stroke m_arrowStroke
Arrow
public Arrow(String type,
int length,
int width)
drawArrow
public void drawArrow(Graphics2D g2d,
int sourceX,
int sourceY,
int destX,
int destY,
int vertexDiam)
getSleekArrow
protected GeneralPath getSleekArrow()
getClassicArrow
protected GeneralPath getClassicArrow()