|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.display.Arrow
public class Arrow
A Drawable arrow that uses Java 2D drawing.
Constructor Summary | |
---|---|
Arrow(double _x,
double _y,
double _a,
double _b)
Constructs an Arrow with the given postion and components. |
Method Summary | |
---|---|
void |
draw(DrawingPanel panel,
java.awt.Graphics g)
Draws the arrow. |
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Arrow(double _x, double _y, double _a, double _b)
_x
- postion_y
- position_a
- horizontal component_b
- vertical componentMethod Detail |
---|
public 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)
draw
in interface Drawable
panel
- the drawing panel in which the arrow is viewedg
- the graphics context upon which to drawpublic static XML.ObjectLoader getLoader()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |