lab3lib
Class BouncingBall

java.lang.Object
  extended by graphics.AbstractGraphic
      extended by graphics.AbstractColorableGraphic
          extended by graphics.Ellipse
              extended by lab3lib.BouncingBall
All Implemented Interfaces:
CenterLocatable, IColorable, IColorableGraphic, IGraphic, ILocatable, IRotatable, ISizeable, IBounceChanger

public class BouncingBall
extends Ellipse
implements IBounceChanger

TODO: A ball that bounces around the screen.

Author:
Adrienne M Decker Created on: Feb 3, 2008

Constructor Summary
BouncingBall()
          Creates a new instance of BouncingBall
 
Method Summary
 void setColor(Color newColor)
          Set the color of a bouncing thing.
 void setDimension(java.awt.Dimension newDimension)
          Changes the Dimension of this Graphic
 void setMovement(Vector movementVector)
          Set the movement vector of a bouncing thing.
 void startBouncing()
          Start the bouncing thing bouncing.
 void stopBouncing()
          Stop the bouncing thing from bouncing.
 
Methods inherited from class graphics.Ellipse
actualPaint, getShape
 
Methods inherited from class graphics.AbstractColorableGraphic
getColor, paint, setColor
 
Methods inherited from class graphics.AbstractGraphic
addMouseListener, addMouseMotionListener, contains, getBounds, getCenterLocation, getContainer, getDimension, getLocation, getMouseListeners, getMouseMotionListeners, getMovement, getRotation, intersects, move, rotate, setCenterLocation, setContainer, setLocation, setMovement, setRotation
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface graphics.IGraphic
addMouseListener, addMouseMotionListener, contains, getBounds, getContainer, getMouseListeners, getMouseMotionListeners, getMovement, intersects, setContainer, setMovement
 
Methods inherited from interface graphics.ISizeable
getDimension
 
Methods inherited from interface graphics.CenterLocatable
getCenterLocation, setCenterLocation
 
Methods inherited from interface graphics.ILocatable
getLocation, move, setLocation
 
Methods inherited from interface graphics.IRotatable
getRotation, rotate, setRotation
 

Constructor Detail

BouncingBall

public BouncingBall()
Creates a new instance of BouncingBall

Method Detail

stopBouncing

public void stopBouncing()
Description copied from interface: IBounceChanger
Stop the bouncing thing from bouncing.

Specified by:
stopBouncing in interface IBounceChanger
See Also:
IBounceChanger.stopBouncing()

startBouncing

public void startBouncing()
Description copied from interface: IBounceChanger
Start the bouncing thing bouncing.

Specified by:
startBouncing in interface IBounceChanger
See Also:
IBounceChanger.startBouncing()

setMovement

public void setMovement(Vector movementVector)
Description copied from interface: IBounceChanger
Set the movement vector of a bouncing thing.

Specified by:
setMovement in interface IBounceChanger
Parameters:
movementVector -
See Also:
IBounceChanger.setMovement(utilities.Vector)

setDimension

public void setDimension(java.awt.Dimension newDimension)
Description copied from class: AbstractGraphic
Changes the Dimension of this Graphic

Specified by:
setDimension in interface ISizeable
Specified by:
setDimension in interface IBounceChanger
Overrides:
setDimension in class AbstractGraphic
Parameters:
newDimension -
See Also:
AbstractGraphic.setDimension(java.awt.Dimension)

setColor

public void setColor(Color newColor)
Description copied from interface: IBounceChanger
Set the color of a bouncing thing.

Specified by:
setColor in interface IBounceChanger
Parameters:
newColor -
See Also:
AbstractColorableGraphic.setColor(java.awt.Color)