cs015.SP
Class OpenCloseBehavior

java.lang.Object
  extended byNGP.Timer
      extended bycs015.SP.OpenCloseBehavior
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class OpenCloseBehavior
extends Timer

Modified by Kalin Agrawal (kagrawal) to work with NGP on 7/1/1999


Constructor Summary
OpenCloseBehavior(SnowMouth target)
          Initializes the behavior and stores the target mouth.
 
Method Summary
 void activate()
          Makes the mouth open and close.
 Timer Copy()
          Makes a copy of the behavior.
 
Methods inherited from class NGP.Timer
actionPerformed, getDelay, setDelay, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenCloseBehavior

public OpenCloseBehavior(SnowMouth target)
Initializes the behavior and stores the target mouth.

Parameters:
target - the mouth to apply the behavior to
Method Detail

activate

public void activate()
Makes the mouth open and close.


Copy

public Timer Copy()
Makes a copy of the behavior. The new behavior will have the same target as the old behavior.

Returns:
a new behavior which is the copy of the current behavior