cs015.SP
Class WinkBehavior

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

public class WinkBehavior
extends Timer

This class is a behavior that takes a generic eye and makes it blink.

Author:
ng

Constructor Summary
WinkBehavior(Eye target)
          Initializes the behavior with a given eye as the target.
 
Method Summary
 void activate()
          Makes the target eye 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

WinkBehavior

public WinkBehavior(Eye target)
Initializes the behavior with a given eye as the target.

Parameters:
target - the target of the behavior
Method Detail

activate

public void activate()
Makes the target eye open and close.


Copy

public Timer Copy()
Makes a copy of the behavior. The copy will act on the same target as the current behavior.

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