jhplot.shapes
Class Arrow
- java.lang.Object
-
- jhplot.shapes.HShape
-
- jhplot.shapes.Arrow
-
- All Implemented Interfaces:
- java.io.Serializable
public class Arrow extends HShape
Build an arrow usingHPlot
canvas. The default is the USER coordinate system.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description Arrow(double X1, double Y1, double X2, double Y2)
Build an arrow inArrow(double X1, double Y1, double X2, double Y2, java.awt.Stroke stroke, java.awt.Color color)
Build an arrow
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
doc()
Show online documentation.double
getEndLength()
Get length of the endsdouble
getEndWidth()
Get widths of the endsint
getType()
Get the type of arrowvoid
setEndLength(double length)
Set lenght of the endsvoid
setEndWidth(double width)
Set width of the endsvoid
setType(int type)
Set the type of arrow: 1,2,3java.lang.String
toString()
Represent it as a string-
Methods inherited from class jhplot.shapes.HShape
contains, getColor, getFill, getPosition, getPositionCoordinate, getRotation, getScaledPosition, getSettings, getStroke, getTransparency, getWhoAm, setColor, setDashed, setDotted, setFill, setPosCoord, setPositionCoordinate, setRotation, setStroke, setTransparency, setWhoAm, updateSettings
-
-
-
-
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 positionY1
- Y start positionX2
- X end positionY2
- Y end positionstroke
- Stroke to draw the linecolor
- Color
-
Arrow
public Arrow(double X1, double Y1, double X2, double Y2)
Build an arrow in- Parameters:
X1
- X start positionY1
- Y start positionX2
- X end positionY2
- 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 classjava.lang.Object
- Returns:
- a string representation of this HShape object
-
doc
public void doc()
Show online documentation.
-
-
DMelt 3.0 © DataMelt by jWork.ORG