|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsm.SMStateMachineEventAdapter
An abstract adapter class for receiving state machine events. The methods in this class are empty. This class exists as convenience for creating listener objects.
State machine events let you track when a state machine is attached to a canvas, detached from a canvas, reset, resumed, suspended or when a state machine passed a transition leading it to a new state or letting it in the current state.
Extend this class to create a SMStateMachineEvent listener and override the methods for the events of interest. (If you implement the SMStateMachineEventListener interface, you have to define all of the methods in it. This abstract class defines null methods for them all, so you can only have to define methods for events you care about.)
Create a listener object using the extended class and then register it 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.
SMStateMachineEvent
,
SMStateMachineEventListener
Constructor Summary | |
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. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SMStateMachineEventAdapter()
Method Detail |
public void smAttached(SMStateMachineEvent e)
SMStateMachineEventListener
smAttached
in interface SMStateMachineEventListener
e
- the event.public void smDetached(SMStateMachineEvent e)
SMStateMachineEventListener
smDetached
in interface SMStateMachineEventListener
e
- the event.public void smSuspended(SMStateMachineEvent e)
SMStateMachineEventListener
smSuspended
in interface SMStateMachineEventListener
e
- the event.public void smResumed(SMStateMachineEvent e)
SMStateMachineEventListener
smResumed
in interface SMStateMachineEventListener
e
- the event.public void smRestarted(SMStateMachineEvent e)
SMStateMachineEventListener
smRestarted
in interface SMStateMachineEventListener
e
- the event.public void smStateChanged(SMStateMachineEvent e)
SMStateMachineEventListener
smStateChanged
in interface SMStateMachineEventListener
e
- the event.public void smStateLooped(SMStateMachineEvent e)
SMStateMachineEventListener
smStateLooped
in interface SMStateMachineEventListener
e
- the event.public void smInited(SMStateMachineEvent e)
SMStateMachineEventListener
smInited
in interface SMStateMachineEventListener
e
- the event.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |