CSE115.Scarecrow
Class FallingLeaf

java.lang.Object
  extended byNGP.Graphics.Shape
      extended byCSE115.Scarecrow.LeafShape
          extended byCSE115.Scarecrow.FallingLeaf
All Implemented Interfaces:
Colorable, EventListener, Graphic, Locatable, MouseListener, MouseMotionListener, Reactor, Rotatable

public class FallingLeaf
extends CSE115.Scarecrow.LeafShape

FallingLeaf.java Created: Thu Sep 14 14:59:33 2000

Author:
Philip R Ventura

Field Summary
protected  LeafFallingBehavior _bhv
           
 
Fields inherited from class NGP.Graphics.Shape
_awtShape, _dpanel
 
Fields inherited from interface NGP.Colorable
DEFAULT_GRAY
 
Constructor Summary
FallingLeaf()
          Creates a new FallingLeaf instance.
 
Method Summary
 void actualPaint(Graphics2D g)
           
 void fall()
          Make the leaf fall to the bottom of the screen.
 Point getLocation()
           
 void setColor(LeafColor color)
          Set the color of the leaf.
 void setLocation(Point pt)
           
 
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 LeafFallingBehavior _bhv
Constructor Detail

FallingLeaf

public FallingLeaf()
Creates a new FallingLeaf instance.

Method Detail

fall

public void fall()
Make the leaf fall to the bottom of the screen.


setColor

public void setColor(LeafColor color)
Set the color of the leaf.

Parameters:
color - the color of the leaf.

actualPaint

public void actualPaint(Graphics2D g)

setLocation

public void setLocation(Point pt)
Specified by:
setLocation in interface Locatable

getLocation

public Point getLocation()
Specified by:
getLocation in interface Locatable