|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCSE115.FishBowl.MovingBodyAdapter
CSE115.FishBowl.Fish
public class Fish
A Fish that moves when told to. Created: Thu Sep 29 15:00:55 2005
Field Summary |
---|
Fields inherited from interface NGP.Colorable |
---|
DEFAULT_GRAY |
Constructor Summary | |
---|---|
Fish()
Creates a new Fish instance. |
Method Summary | |
---|---|
int |
getSize()
Returns the size of the Fish. |
void |
setSize(int size)
Sets the size of the Fish. |
void |
update()
Update the position and orientation of the fish based on the velocity. |
Methods inherited from class CSE115.FishBowl.MovingBodyAdapter |
---|
contains, getBounds, getCenterLocation, getColor, getDimension, getDrawingPanel, getDx, getDy, getLocation, getRotation, hide, intersects, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, paint, react, setBackgroundColor, setColor, setDimension, setDrawingPanel, setFrameDelay, setLocation, setRotation, setVelocity, show, startBouncing, stopBouncing |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Fish()
Fish
instance.
Method Detail |
---|
public int getSize()
public void setSize(int size)
size
- the new size of the Fish (must be greater than 0).public void update()
update
in interface MovingBody
update
in class MovingBodyAdapter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |