CSE115.BallWorld
Class Ball

java.lang.Object
  |
  +--CSE115.BallWorld.MovingBodyAdapter
        |
        +--CSE115.BallWorld.Ball
All Implemented Interfaces:
Colorable, EventListener, Graphic, Locatable, MouseListener, MouseMotionListener, MovingBody, Reactor, Rotatable, Shape, Sizeable

public class Ball
extends MovingBodyAdapter

A ball that moves when told to. Created: Sun Feb 10 15:00:55 2002

Author:
Phil Ventura

Field Summary
 
Fields inherited from interface NGP.Colorable
DEFAULT_GRAY
 
Constructor Summary
Ball()
          Creates a new Ball instance.
 
Method Summary
 int getSize()
          Returns the size of the ball.
 void setSize(int size)
          Sets the size of the ball.
 
Methods inherited from class CSE115.BallWorld.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, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ball

public Ball()
Creates a new Ball instance.

Method Detail

getSize

public int getSize()
Returns the size of the ball.

Returns:
the size of the ball.

setSize

public void setSize(int size)
Sets the size of the ball.

Parameters:
size - the new size of the ball (must be greater than 0).