| Modifier and Type | Field | Description |
|---|---|---|
protected double |
a |
|
protected double |
b |
|
protected java.awt.Color |
color |
|
protected float |
headSize |
|
protected double |
x |
|
protected double |
y |
| Constructor | Description |
|---|---|
Arrow(double _x,
double _y,
double _a,
double _b) |
Constructs an Arrow with the given postion and components.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
draw(DrawingPanel panel,
java.awt.Graphics g) |
Draws the arrow.
|
protected java.awt.Shape |
getHead(double theta) |
Gets the arrowhead shape.
|
float |
getHeadSize() |
Gets the headsize for the arrow.
|
static XML.ObjectLoader |
getLoader() |
Gets a loader that allows a Circle to be represented as XML data.
|
double |
getX() |
Gets the x coordinate.
|
double |
getXlength() |
Gets the horizontal component.
|
double |
getY() |
Gets the y coordinate.
|
double |
getYlength() |
Gets the vertical component.
|
void |
setColor(java.awt.Color c) |
Sets the arrow's color.
|
void |
setHeadSize(float size) |
Sets the headsize for the arrow.
|
void |
setX(double x) |
Sets the x coordinate.
|
void |
setXlength(double dx) |
Sets the arrow's horizontal component.
|
void |
setXY(double x,
double y) |
Sets the x and y coordinates.
|
void |
setY(double y) |
Sets the y coordinate.
|
void |
setYlength(double dy) |
Sets the arrows vertical component.
|
protected float headSize
protected java.awt.Color color
protected double x
protected double y
protected double a
protected double b
public Arrow(double _x,
double _y,
double _a,
double _b)
_x - postion_y - position_a - horizontal component_b - vertical componentpublic double getX()
public void setX(double x)
x - public double getY()
public void setY(double y)
y - public void setXY(double x,
double y)
y - public void setColor(java.awt.Color c)
c - public void setXlength(double dx)
dx - public void setYlength(double dy)
dy - public double getXlength()
public double getYlength()
public float getHeadSize()
public void setHeadSize(float size)
size - float the head size in pixels.public void draw(DrawingPanel panel, java.awt.Graphics g)
protected java.awt.Shape getHead(double theta)
theta - double the angle of the arrowpublic static XML.ObjectLoader getLoader()