|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensourcephysics.display.DrawableGroup
public class DrawableGroup
Draws a group of shapes.
| Field Summary | |
|---|---|
protected java.util.ArrayList<Drawable> |
drawableList
|
protected double |
theta
|
protected double |
x
|
protected double |
y
|
| Constructor Summary | |
|---|---|
DrawableGroup()
|
|
| Method Summary | |
|---|---|
void |
addDrawable(Drawable drawable)
Adds a drawable object to the drawable list. |
void |
draw(DrawingPanel panel,
java.awt.Graphics g)
Draws the shapes in the drawable list. |
double |
getTheta()
Gets the rotation angle in radians. |
double |
getX()
Gets the x location. |
double |
getY()
Gets the y location. |
void |
setTheta(double _theta)
Sets the rotation angle in radians. |
void |
setX(double _x)
Sets the x coordinate. |
void |
setXY(double _x,
double _y)
Sets the x and y coordinates. |
void |
setY(double _y)
Sets the y coordinate. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected double x
protected double y
protected double theta
protected java.util.ArrayList<Drawable> drawableList
| Constructor Detail |
|---|
public DrawableGroup()
| Method Detail |
|---|
public void addDrawable(Drawable drawable)
drawable -
public void draw(DrawingPanel panel,
java.awt.Graphics g)
draw in interface Drawablepanel - the drawing panelg - the graphics context
public void setXY(double _x,
double _y)
_x - double_y - doublepublic void setX(double _x)
_x - public double getX()
public double getY()
public void setY(double _y)
_y - public double getTheta()
public void setTheta(double _theta)
_theta -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||