|
Ball World Problem Set Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectballworld.Faller
A Ball that falls and bounces.
| Constructor Summary | |
Faller(World w)
Create a faller that starts at the top, center of the screen |
|
| Method Summary | |
void |
act()
|
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Faller(World w)
w - The world we are being creted in| Method Detail |
public double getX()
Ball
getX in interface Ballpublic double getY()
Ball
getY in interface Ballpublic double getRadius()
Ball
getRadius in interface Ballpublic void setWorld(World theWorld)
Ball
setWorld in interface BalltheWorld - A world object that contains this ball
public void userClicked(double atX,
double atY)
Ball
userClicked in interface BallatX - The x coordinate of the user's clickatY - The y coordinate of the user's clickpublic void userTyped(char key)
Ball
userTyped in interface Ballkey - The character from the key that the user typed.public void act()
act in interface Animate
|
Ball World Problem Set Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||