DrawableMeasuredCircle, TrackableCirclepublic class Circle extends java.lang.Object implements Drawable
| Modifier and Type | Field | Description |
|---|---|---|
java.awt.Color |
color |
|
int |
pixRadius |
|
protected double |
x |
|
protected double |
y |
| Constructor | Description |
|---|---|
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.
|
| Modifier and Type | Method | Description |
|---|---|---|
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.
|
public java.awt.Color color
public int pixRadius
protected double x
protected double y
public Circle()
public Circle(double _x,
double _y)
_x - _y - public Circle(double _x,
double _y,
int _r)
_x - _y - _r - public void draw(DrawingPanel panel, java.awt.Graphics 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()