|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensourcephysics.display.Circle
public class Circle
A Drawable circle that uses awt drawing.
| Field Summary | |
|---|---|
java.awt.Color |
color
|
int |
pixRadius
|
protected double |
x
|
protected double |
y
|
| Constructor Summary | |
|---|---|
Circle()
Constructs a fixed radius circle at the origin. |
|
Circle(double _x,
double _y)
Constructs a fixed radius circle at the given coordinates. |
|
Circle(double _x,
double _y,
int _r)
Constructs a fixed radius circle at the given coordinates with the given radius. |
|
| Method Summary | |
|---|---|
void |
draw(DrawingPanel panel,
java.awt.Graphics g)
Draws the circle. |
static XML.ObjectLoader |
getLoader()
Gets a loader that allows a Circle to be represented as XML data. |
double |
getX()
Gets the x coordinate. |
double |
getY()
Gets the y coordinate. |
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. |
java.lang.String |
toString()
Returns a string representation of the circle. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public java.awt.Color color
public int pixRadius
protected double x
protected double y
| Constructor Detail |
|---|
public Circle()
public Circle(double _x,
double _y)
_x - _y -
public Circle(double _x,
double _y,
int _r)
_x - _y - _r - | Method Detail |
|---|
public void draw(DrawingPanel panel,
java.awt.Graphics g)
draw in interface Drawablepanel - g - 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)
x - y - public java.lang.String toString()
toString in class java.lang.Objectpublic static XML.ObjectLoader getLoader()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||