lab2lib
Class BouncingTriangle

java.lang.Object
  extended by graphics.AbstractGraphic
      extended by graphics.AbstractColorableGraphic
          extended by graphics.Polygon
              extended by lab2lib.BouncingTriangle
All Implemented Interfaces:
CenterLocatable, IColorable, IColorableGraphic, IGraphic, ILocatable, IRotatable, ISizeable, IBounceChanger

public class BouncingTriangle
extends Polygon
implements IBounceChanger


Constructor Summary
BouncingTriangle()
          Creates a new instance of BouncingSquare
 
Method Summary
 void setColor(Color newColor)
          Set the color of a bouncing thing.
 void setDimension(java.awt.Dimension newDimension)
          Resizes the Polygon to a specified dimension.
 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.Polygon
actualPaint, addPoint, getShape, removePoint, setLocation
 
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, 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
 
Methods inherited from interface graphics.IRotatable
getRotation, rotate, setRotation
 

Constructor Detail

BouncingTriangle

public BouncingTriangle()
Creates a new instance of BouncingSquare

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: Polygon
Resizes the Polygon to a specified dimension.

Specified by:
setDimension in interface ISizeable
Specified by:
setDimension in interface IBounceChanger
Overrides:
setDimension in class Polygon
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)