net.jinx.action
Class ClockStateEvent

java.lang.Object
  extended by net.jinx.action.ActorEvent
      extended by net.jinx.action.ClockStateEvent

public class ClockStateEvent
extends ActorEvent

ClockStateEvents are sent out by Clock to notify ClockSensitive and IdleSensitve Actors that the Clock's state has changed.

API Stability: Stable.


Field Summary
static int STATE_PAUSE
          State constant to signal that the Clock has paused.
static int STATE_START
          State constant to signal that the Clock has started.
static int STATE_STOP
          State constant to signal that the Clock has stopped.
static int STATE_UNPAUSE
          State constant to signal that the Clock has unpaused.
 
Constructor Summary
ClockStateEvent(int state)
          Constructs a ClockStateEvent.
 
Method Summary
 int getState()
          Provides the state constant that was passed in via the constructor.
 
Methods inherited from class net.jinx.action.ActorEvent
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATE_START

public static final int STATE_START
State constant to signal that the Clock has started.

See Also:
Constant Field Values

STATE_PAUSE

public static final int STATE_PAUSE
State constant to signal that the Clock has paused.

See Also:
Constant Field Values

STATE_UNPAUSE

public static final int STATE_UNPAUSE
State constant to signal that the Clock has unpaused.

See Also:
Constant Field Values

STATE_STOP

public static final int STATE_STOP
State constant to signal that the Clock has stopped.

See Also:
Constant Field Values
Constructor Detail

ClockStateEvent

public ClockStateEvent(int state)
Constructs a ClockStateEvent.

Parameters:
state - the state that it will carry.
Throws:
java.lang.IllegalArgumentException - if state is not one of the STATE_ constants from this class.
Method Detail

getState

public int getState()
Provides the state constant that was passed in via the constructor.

Returns:
the state as an int.