java.lang.Object Circle
public class Circle
A circle that can be manipulated and that draws itself on a canvas.
Constructor Summary | |
---|---|
Circle()
Create a new circle at default position with default color. |
|
Circle(int originalX,
int originalY)
Create a new circle at specified position (originalX,originalY) with default color. |
Method Summary | |
---|---|
void |
changeColor(java.lang.String newColor)
Change the color. |
void |
changeSize(int newDiameter)
Change the size to the new size (in pixels). |
void |
makeInvisible()
Make this circle invisible. |
void |
makeVisible()
Make this circle visible. |
void |
moveDown()
Move the circle a few pixels down. |
void |
moveHorizontal(int distance)
Move the circle horizontally by 'distance' pixels. |
void |
moveLeft()
Move the circle a few pixels to the left. |
void |
moveRight()
Move the circle a few pixels to the right. |
void |
moveUp()
Move the circle a few pixels up. |
void |
moveVertical(int distance)
Move the circle vertically by 'distance' pixels. |
void |
slowMoveHorizontal(int distance)
Slowly move the circle horizontally by 'distance' pixels. |
void |
slowMoveVertical(int distance)
Slowly move the circle vertically by 'distance' pixels. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Circle()
public Circle(int originalX, int originalY)
Method Detail |
---|
public void changeColor(java.lang.String newColor)
public void changeSize(int newDiameter)
public void makeInvisible()
public void makeVisible()
public void moveDown()
public void moveHorizontal(int distance)
public void moveLeft()
public void moveRight()
public void moveUp()
public void moveVertical(int distance)
public void slowMoveHorizontal(int distance)
public void slowMoveVertical(int distance)