jhplot.shapes
Class Arrow

java.lang.Object
  extended by jhplot.shapes.HShape
      extended by jhplot.shapes.Arrow

public class Arrow
extends HShape

Build an arrow. The default is the USER coordinate system.


Field Summary
 
Fields inherited from class jhplot.shapes.HShape
ARROW, CIRCLE, ELLIPSE, IMAGE, LINE, POLYGON, RECTAN, TEXT
 
Constructor Summary
Arrow(double X1, double Y1, double X2, double Y2)
          Build an arrow in
Arrow(double X1, double Y1, double X2, double Y2, java.awt.Stroke stroke, java.awt.Color color)
          Build an arrow
 
Method Summary
 double getEndLength()
          Get length of the ends
 double getEndWidth()
          Get widths of the ends
 int getType()
          Get the type of arrow
 void setEndLength(double length)
          Set lenght of the ends
 void setEndWidth(double width)
          Set width of the ends
 void setType(int type)
          Set the type of arrow: 1,2,3
 java.lang.String toString()
          Represent it as a string
 
Methods inherited from class jhplot.shapes.HShape
contains, getColor, getFill, getPosition, getPositionCoordinate, getScaledPosition, getSettings, getStroke, getTransparency, getWhoAm, setColor, setDashed, setDotted, setFill, setPosCoord, setStroke, setTransparency, setWhoAm, updateSettings
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Arrow

public Arrow(double X1,
             double Y1,
             double X2,
             double Y2,
             java.awt.Stroke stroke,
             java.awt.Color color)
Build an arrow

Parameters:
X1 - X start position
Y1 - Y start position
X2 - X end position
Y2 - Y end position
stroke - Stroke to draw the line
color - Color

Arrow

public Arrow(double X1,
             double Y1,
             double X2,
             double Y2)
Build an arrow in

Parameters:
X1 - X start position
Y1 - Y start position
X2 - X end position
Y2 - Y end position
Method Detail

getEndLength

public double getEndLength()
Get length of the ends

Returns:
lenght

getEndWidth

public double getEndWidth()
Get widths of the ends

Returns:
width

setEndLength

public void setEndLength(double length)
Set lenght of the ends

Parameters:
length - lenght of the ends

setEndWidth

public void setEndWidth(double width)
Set width of the ends

Parameters:
width - width of the ends

setType

public void setType(int type)
Set the type of arrow: 1,2,3


getType

public int getType()
Get the type of arrow


toString

public java.lang.String toString()
Represent it as a string

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this HShape object


jHepWork 1.1 (C) Chekanov