kaapo.project.graphics
Class LineArrowHead

java.lang.Object
  extended by kaapo.project.graphics.LineHead
      extended by kaapo.project.graphics.LineArrowHead

public class LineArrowHead
extends LineHead

Basic non-filled arrow head. Arrow length and angle can be customized.

Author:
hkovaska

Field Summary
protected  double arrowAngle
          Angle of arrow head.
protected  double arrowDLength
          Diagonal length of the arrow.
 
Fields inherited from class kaapo.project.graphics.LineHead
preferredHeadLength
 
Constructor Summary
LineArrowHead(double preferredHeadLength)
          Constructs the head with default arrow geometry.
LineArrowHead(double preferredHeadLength, double arrowDLength, double arrowAngle)
          Constructs the head with given geometry.
 
Method Summary
protected  GeneralPath makeHeadImpl(double startX, double startY, double endX, double endY)
           
 
Methods inherited from class kaapo.project.graphics.LineHead
getPreferredLength, makeHead, makeHead
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

arrowDLength

protected double arrowDLength
Diagonal length of the arrow.


arrowAngle

protected double arrowAngle
Angle of arrow head.

Constructor Detail

LineArrowHead

public LineArrowHead(double preferredHeadLength,
                     double arrowDLength,
                     double arrowAngle)
Constructs the head with given geometry.

Parameters:
preferredHeadLength - The preferred head length. See notes in LineHead documentation for this.
arrowDLength - Diagonal length of the arrow in pixels.
arrowAngle - Angle of the arrow in radians. Normally between PI/8..PI/3, but in theory can be any angle between 0..PI/2.

LineArrowHead

public LineArrowHead(double preferredHeadLength)
Constructs the head with default arrow geometry.

Parameters:
preferredHeadLength - The preferred head length. See notes in LineHead documentation for this.
Method Detail

makeHeadImpl

protected GeneralPath makeHeadImpl(double startX,
                                   double startY,
                                   double endX,
                                   double endY)
Specified by:
makeHeadImpl in class LineHead