|
Ball World Problem Set Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ballworld.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 inMethod Detail |
public double getX()
Ball
getX
in interface Ball
public double getY()
Ball
getY
in interface Ball
public double getRadius()
Ball
getRadius
in interface Ball
public void setWorld(World theWorld)
Ball
setWorld
in interface Ball
theWorld
- A world object that contains this ballpublic void userClicked(double atX, double atY)
Ball
userClicked
in interface Ball
atX
- The x coordinate of the user's clickatY
- The y coordinate of the user's clickpublic void userTyped(char key)
Ball
userTyped
in interface Ball
key
- 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 |