org.tigris.gef.presentation
Class ArrowHead

java.lang.Object
  extended by org.tigris.gef.presentation.ArrowHead
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ArrowHeadComposite, ArrowHeadDiamond, ArrowHeadGreater, ArrowHeadHalfTriangle, ArrowHeadNone, ArrowHeadQualifier, ArrowHeadTriangle

public abstract class ArrowHead
extends java.lang.Object
implements java.io.Serializable

Abstract class to draw arrow heads on the ends of FigEdges.

See Also:
Serialized Form

Field Summary
protected  int arrow_height
           
protected  int arrow_width
           
protected  java.awt.Color arrowFillColor
           
protected  java.awt.Color arrowLineColor
           
 
Constructor Summary
ArrowHead()
           
ArrowHead(java.awt.Color line, java.awt.Color fill)
           
 
Method Summary
 double dist(double dx, double dy)
           
 double dist(int x0, int y0, int x1, int y1)
           
 java.awt.Color getFillColor()
           
 java.awt.Color getLineColor()
           
 int getLineLength(java.awt.Point one, java.awt.Point two)
          return the approximate arc length of the path in pixel units
abstract  void paint(java.awt.Graphics g, java.awt.Point start, java.awt.Point end)
           
 void paintAtHead(java.awt.Graphics g, Fig path)
           
 void paintAtTail(java.awt.Graphics g, Fig path)
           
 java.awt.Point pointAlongLine(java.awt.Point one, java.awt.Point two, int dist)
          return a point that is dist pixels along the path
 void setFillColor(java.awt.Color newColor)
           
 void setLineColor(java.awt.Color newColor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

arrow_width

protected int arrow_width

arrow_height

protected int arrow_height

arrowLineColor

protected java.awt.Color arrowLineColor

arrowFillColor

protected java.awt.Color arrowFillColor
Constructor Detail

ArrowHead

public ArrowHead()

ArrowHead

public ArrowHead(java.awt.Color line,
                 java.awt.Color fill)
Method Detail

getLineColor

public java.awt.Color getLineColor()

setLineColor

public void setLineColor(java.awt.Color newColor)

getFillColor

public java.awt.Color getFillColor()

setFillColor

public void setFillColor(java.awt.Color newColor)

paint

public abstract void paint(java.awt.Graphics g,
                           java.awt.Point start,
                           java.awt.Point end)

paintAtHead

public void paintAtHead(java.awt.Graphics g,
                        Fig path)

paintAtTail

public void paintAtTail(java.awt.Graphics g,
                        Fig path)

getLineLength

public int getLineLength(java.awt.Point one,
                         java.awt.Point two)
return the approximate arc length of the path in pixel units


pointAlongLine

public java.awt.Point pointAlongLine(java.awt.Point one,
                                     java.awt.Point two,
                                     int dist)
return a point that is dist pixels along the path


dist

public double dist(int x0,
                   int y0,
                   int x1,
                   int y1)

dist

public double dist(double dx,
                   double dy)