|
Ball World Problem Set Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The Ball interface describes methods that a Ball presents to other objects. Classes that you define will implement Ball by defining the methods that are declared here.
Method Summary | |
double |
getRadius()
Returns the current radius of the Ball |
double |
getX()
Returns the current horizontal location of the Ball |
double |
getY()
Returns the current vertical location of the Ball |
void |
setWorld(World theWorld)
This method will be called by our setup code shortly after your Ball is created. |
void |
userClicked(double atX,
double atY)
Process a click from the mouse. |
void |
userTyped(char key)
This method is called if the user selects this particualr ball and then types a key. |
Method Detail |
public double getX()
public double getY()
public double getRadius()
public void setWorld(World theWorld)
theWorld
- A world object that contains this ballpublic void userClicked(double atX, double atY)
atX
- The x coordinate of the user's clickatY
- The y coordinate of the user's clickpublic void userTyped(char key)
key
- The character from the key that the user typed.
|
Ball World Problem Set Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |