sm
Interface SMStateMachineEventListener

All Superinterfaces:
java.util.EventListener
All Known Implementing Classes:
SMStateMachineEventAdapter

public interface SMStateMachineEventListener
extends java.util.EventListener

The listener interface for receiving "interesting" state machine events:

The class that is interested in processing a state machine event either implements this interface (and all the methods it contains) or extends the abstract SMStateMachineEventAdapter class (overriding only the methods of interest).

The listener object created from that class is then registered with a state machine using the state machine's addSMListener method. When the state machine is attached, detached, resumed, reset, suspended, goes to another state or loops on the current state, the relevant method in the listener object is invoked and the SMStateMachineEvent is passed to it.

Author:
Caroline Appert
See Also:
SMStateMachineEvent, SMStateMachineEventAdapter

Method Summary
 void smAttached(SMStateMachineEvent e)
          Invoked when the state machine has been attached to a canvas.
 void smDetached(SMStateMachineEvent e)
          Invoked when the state machine has been detached from a canvas.
 void smInited(SMStateMachineEvent e)
          Invoked when the state machine has been inited.
 void smRestarted(SMStateMachineEvent e)
          Invoked when the state machine has been reset.
 void smResumed(SMStateMachineEvent e)
          Invoked when the state machine has been resumed.
 void smStateChanged(SMStateMachineEvent e)
          Invoked when the state machine has fired a transition changing the current state.
 void smStateLooped(SMStateMachineEvent e)
          Invoked when the state machine has fired a transition making it loop on the current state.
 void smSuspended(SMStateMachineEvent e)
          Invoked when the state machine has been suspended.
 

Method Detail

smAttached

public void smAttached(SMStateMachineEvent e)
Invoked when the state machine has been attached to a canvas.

Parameters:
e - the event.

smDetached

public void smDetached(SMStateMachineEvent e)
Invoked when the state machine has been detached from a canvas.

Parameters:
e - the event.

smSuspended

public void smSuspended(SMStateMachineEvent e)
Invoked when the state machine has been suspended.

Parameters:
e - the event.

smResumed

public void smResumed(SMStateMachineEvent e)
Invoked when the state machine has been resumed.

Parameters:
e - the event.

smRestarted

public void smRestarted(SMStateMachineEvent e)
Invoked when the state machine has been reset.

Parameters:
e - the event.

smStateChanged

public void smStateChanged(SMStateMachineEvent e)
Invoked when the state machine has fired a transition changing the current state.

Parameters:
e - the event.

smStateLooped

public void smStateLooped(SMStateMachineEvent e)
Invoked when the state machine has fired a transition making it loop on the current state.

Parameters:
e - the event.

smInited

public void smInited(SMStateMachineEvent e)
Invoked when the state machine has been inited.

Parameters:
e - the event.