CSE115.Snowman
Class Snowflake
java.lang.Object
NGP.Graphics.Shape
CSE115.Snowman.SnowflakeShape
CSE115.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
|
Constructor Summary |
Snowflake()
Creates a new Snowflake instance. |
| 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 |
_bhv
protected SnowflakeFallingBehavior _bhv
Snowflake
public Snowflake()
- Creates a new
Snowflake instance.
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