java.lang.ObjectCircle
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. |
|
| Method Summary | |
|---|---|
void |
changeColor(String pNewColor)
Change the color. |
void |
changeSize(int pNewDiameter)
Change the size to the new size (in pixels). |
void |
doubleSize()
Double the size (in pixels). |
void |
makeInvisible()
Make this circle invisible. |
void |
makeVisible()
Make this circle visible. |
void |
moveDown()
|
void |
moveHorizontal(int pDistance)
Move the circle horizontally by 'distance' pixels. |
void |
moveLeft()
|
void |
moveRight()
Move the circle a few pixels to the right. |
void |
moveUp()
Move the circle a few pixels up. |
void |
moveVertical(int pDistance)
|
void |
slowMoveHorizontal(int pDistance)
Slowly move the shape horizontally by 'distance' pixels. |
void |
slowMoveVertical(int pDistance)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Circle()
| Method Detail |
|---|
public void changeColor(String pNewColor)
pNewColor - color we want for this circlepublic void changeSize(int pNewDiameter)
pNewDiameter - diameter we want for this circlepublic void doubleSize()
public void makeInvisible()
public void makeVisible()
public void moveDown()
public void moveHorizontal(int pDistance)
pDistance - nb of pixels to move towards rightpublic void moveLeft()
public void moveRight()
public void moveUp()
public void moveVertical(int pDistance)
public void slowMoveHorizontal(int pDistance)
pDistance - nb of pixels to move towards rightpublic void slowMoveVertical(int pDistance)