CSE115.Gumball
Class Gumball

java.lang.Object
  extended byNGP.Graphics.Shape
      extended byNGP.Graphics.RectangularShape
          extended byNGP.Graphics.FilledRectangularShape
              extended byNGP.Graphics.FilledEllipse
                  extended byCSE115.Gumball.Gumball
All Implemented Interfaces:
Colorable, EventListener, Graphic, Locatable, MouseListener, MouseMotionListener, Reactor, Rotatable, Sizeable

public class Gumball
extends FilledEllipse

A gumball that has the capability of falling down and across the screen.

Author:
Carl Alphonce (alphonce) Based heavily on the RainDropShape class, authored by:, Matt Chotin (mhc), Michelle Neuringer

Field Summary
protected  GumballFallingBehavior _bhv
           
 
Fields inherited from class NGP.Graphics.Shape
_awtShape, _dpanel
 
Fields inherited from interface NGP.Colorable
DEFAULT_GRAY
 
Constructor Summary
Gumball()
           
 
Method Summary
 void fall()
          Causes the Gumball to fall a small amount down and across the screen.
 void setSize(GumballSize size)
           
 void update()
          Causes the Gumball to fall a small amount down and across the screen.
 
Methods inherited from class NGP.Graphics.FilledRectangularShape
actualPaint
 
Methods inherited from class NGP.Graphics.RectangularShape
getDimension, getLocation, setCenterLocation, setDimension, setLocation, unwrap, wrap
 
Methods inherited from class NGP.Graphics.Shape
contains, drag, getBounds, getCenterLocation, getColor, getDrawingPanel, getRotation, hide, intersects, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, paint, react, setColor, setDrawingPanel, setRotation, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_bhv

protected GumballFallingBehavior _bhv
Constructor Detail

Gumball

public Gumball()
Method Detail

setSize

public void setSize(GumballSize size)

update

public void update()
Causes the Gumball to fall a small amount down and across the screen.


fall

public void fall()
Causes the Gumball to fall a small amount down and across the screen.