sddl.hierarchy
Class Arrow

java.lang.Object
  extended by sddl.hierarchy.Shape
      extended by sddl.hierarchy.Arrow

public class Arrow
extends Shape

This Shape represents an Arrow

Version:
1.00
Author:
Mathieu Bourgeois

Constructor Summary
Arrow(Path path)
          Creates an Arrow from a Path
 
Method Summary
 Arrow copy()
          Returns a copy of this Arrow
 void draw(AbstractPoint location, java.io.PrintWriter out)
          Standard SDDL draw function.
 Path getPath()
          Obtain the path of an arrow
 Path obtainPath()
          Returns the Path used by this arrow
 void setEndingTangent(Point dir)
          Standard SDDL setter for endingTangent property
 void setStartingTangent(Point dir)
          Standard SDDL setter for startingTangent property
 void setText(java.lang.String text, double position, Point dir, boolean absolute)
          Sets the text of an arrow at a particular position
 
Methods inherited from class sddl.hierarchy.Shape
isVisible, setVisible
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Arrow

public Arrow(Path path)
Creates an Arrow from a Path

Parameters:
path - The Path used to create an Arrow
Method Detail

copy

public Arrow copy()
Returns a copy of this Arrow

Specified by:
copy in class Shape
Returns:
A copy of this Arrow

setText

public void setText(java.lang.String text,
                    double position,
                    Point dir,
                    boolean absolute)
Sets the text of an arrow at a particular position

Parameters:
text - The text to put
position - The position at which to position it along the path (in the range [0..1])
dir - A vector describing the direction to use
absolute - If true, the vector is interpreted as is, if not, the vector is interpreted relative to the tangent of the Path at the current position

setStartingTangent

public void setStartingTangent(Point dir)
Standard SDDL setter for startingTangent property

Parameters:
dir - The starting tangent of the arrow

setEndingTangent

public void setEndingTangent(Point dir)
Standard SDDL setter for endingTangent property

Parameters:
dir - The ending tangent of the arrow

getPath

public Path getPath()
Obtain the path of an arrow

Returns:
The Path used by the arrow

draw

public void draw(AbstractPoint location,
                 java.io.PrintWriter out)
Description copied from class: Shape
Standard SDDL draw function. Every shape must implement this

Specified by:
draw in class Shape
Parameters:
location - The location of the Shape on the main drawing
out - The file to be written to

obtainPath

public Path obtainPath()
Returns the Path used by this arrow

Specified by:
obtainPath in class Shape
Returns:
The Path used by this arrow