kaapo.project.graphics
Class FilledArrowHead

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

public class FilledArrowHead
extends LineHead

Filled arrow head. Head length and arrow angle can be customized. The head looks like the UML Generalization head. The head can be drawn with outlines only or filled with a color.

TODO: filling is not actually tested.

Author:
hkovaska

Field Summary
protected  double arrowAngle
           
 
Fields inherited from class kaapo.project.graphics.LineHead
preferredHeadLength
 
Constructor Summary
FilledArrowHead(double preferredHeadLength)
          Constructs the head with default angle.
FilledArrowHead(double preferredHeadLength, double arrowAngle)
          /** Constructs the head with given angle.
 
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

arrowAngle

protected double arrowAngle
Constructor Detail

FilledArrowHead

public FilledArrowHead(double preferredHeadLength,
                       double arrowAngle)
/** Constructs the head with given angle.

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

FilledArrowHead

public FilledArrowHead(double preferredHeadLength)
Constructs the head with default angle.

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