org.opensourcephysics.display
Class DrawableGroup

java.lang.Object
  extended by org.opensourcephysics.display.DrawableGroup
All Implemented Interfaces:
Drawable

public class DrawableGroup
extends java.lang.Object
implements Drawable

Draws a group of shapes.

Version:
1.0
Author:
Wolfgang Christian

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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrawableGroup

public DrawableGroup()
Method Detail

addDrawable

public void addDrawable(Drawable drawable)
Adds a drawable object to the drawable list.

Parameters:
drawable -

draw

public void draw(DrawingPanel panel,
                 java.awt.Graphics g)
Draws the shapes in the drawable list.

Specified by:
draw in interface Drawable
Parameters:
panel - the drawing panel
g - the graphics context

setXY

public void setXY(double _x,
                  double _y)
Sets the x and y coordinates.

Parameters:
_x - double
_y - double

setX

public void setX(double _x)
Sets the x coordinate.

Parameters:
_x -

getX

public double getX()
Gets the x location.

Returns:
x

getY

public double getY()
Gets the y location.

Returns:
y

setY

public void setY(double _y)
Sets the y coordinate.

Parameters:
_y -

getTheta

public double getTheta()
Gets the rotation angle in radians.

Returns:
theta

setTheta

public void setTheta(double _theta)
Sets the rotation angle in radians.

Parameters:
_theta -