CSE115.Snowman
Class Snowflake

java.lang.Object
  extended byNGP.Graphics.Shape
      extended byCSE115.Snowman.SnowflakeShape
          extended byCSE115.Snowman.Snowflake
All Implemented Interfaces:
Colorable, EventListener, Graphic, Locatable, MouseListener, MouseMotionListener, Reactor, Rotatable

public class Snowflake
extends CSE115.Snowman.SnowflakeShape

A single snowflake that falls from the sky.

Author:
Phil Ventura

Field Summary
protected  SnowflakeFallingBehavior _bhv
           
 
Fields inherited from class NGP.Graphics.Shape
_awtShape, _dpanel
 
Fields inherited from interface NGP.Colorable
DEFAULT_GRAY
 
Constructor Summary
Snowflake()
          Creates a new Snowflake instance.
 
Method Summary
 void actualPaint(Graphics2D g)
           
 void fallGently()
          Have the Snowflake fall down the screen.
 Point getLocation()
           
 void setColor(SnowflakeColor newColor)
          Change the color of the Snowflake.
 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 SnowflakeFallingBehavior _bhv
Constructor Detail

Snowflake

public Snowflake()
Creates a new Snowflake instance.

Method Detail

setColor

public void setColor(SnowflakeColor newColor)
Change the color of the Snowflake.

Parameters:
newColor - the new SnowflakeColor for this Snowflake.

fallGently

public void fallGently()
Have the Snowflake fall down the screen.


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