|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectqx.core.Object
qx.core.Target
qx.util.fsm.FiniteStateMachine
public class FiniteStateMachine
A finite state machine.
See State
for details on creating States,
and qx.util.fsm.Transitions
for details on creating
transitions between states.
Constructor Summary | |
---|---|
FiniteStateMachine()
|
|
FiniteStateMachine(java.lang.String machineName)
|
Method Summary | |
---|---|
void |
addObject(java.lang.String friendlyName,
java.lang.Object obj,
java.lang.Object groupNames)
Add an object (typically a widget) that is to be accessed during state transitions, to the finite state machine. |
void |
addState(State state)
Add a state to the finite state machine. |
Event |
copyEvent(Event event)
Copy an event |
void |
displayAllObjects()
Display all of the saved objects and their reverse mappings. |
void |
enqueueEvent(Event event,
boolean bAddAtHead)
Enqueue an event for processing |
void |
eventListener(Event event)
Event listener for all event types in the finite state machine |
int |
getDebugFlags()
Returns the (computed) value of the property debugFlags . |
java.lang.String |
getFriendlyName(java.lang.Object obj)
Get the friendly name of an object. |
java.lang.Object |
getGroupObjects(java.lang.String groupName)
Retrieve the list of objects which have registered, via addObject as being members of the specified group. |
int |
getMaxSavedStates()
Returns the (computed) value of the property maxSavedStates . |
java.lang.String |
getName()
Returns the (computed) value of the property name . |
java.lang.String |
getNextState()
Returns the (computed) value of the property nextState . |
java.lang.Object |
getObject(java.lang.String friendlyName)
Retrieve an object previously saved via addObject(java.lang.String, java.lang.Object, java.lang.Object) , using its
Friendly Name. |
java.lang.String |
getPreviousState()
Returns the (computed) value of the property previousState . |
java.lang.String |
getState()
Returns the (computed) value of the property state . |
void |
initDebugFlags(int arg)
Calls the apply method and dispatches the change event of the property debugFlags
with the default value defined by the class developer. |
void |
initMaxSavedStates(int arg)
Calls the apply method and dispatches the change event of the property maxSavedStates
with the default value defined by the class developer. |
void |
initName(java.lang.String arg)
Calls the apply method and dispatches the change event of the property name
with the default value defined by the class developer. |
void |
initNextState(java.lang.String arg)
Calls the apply method and dispatches the change event of the property nextState
with the default value defined by the class developer. |
void |
initPreviousState(java.lang.String arg)
Calls the apply method and dispatches the change event of the property previousState
with the default value defined by the class developer. |
void |
initState(java.lang.String arg)
Calls the apply method and dispatches the change event of the property state
with the default value defined by the class developer. |
void |
postponeEvent(Event event)
Add the specified event to a list of events to be passed to the next state following state transition. |
void |
pushState(boolean bCurrent)
Save the current or previous state on the saved-state stack. |
void |
removeObject(java.lang.String friendlyName)
Remove an object which had previously been added by addObject(java.lang.String, java.lang.Object, java.lang.Object) . |
java.lang.Object |
replaceState(State state,
boolean bDispose)
Replace a state in the finite state machine. |
void |
resetDebugFlags()
Resets the user value of the property debugFlags . |
void |
resetMaxSavedStates()
Resets the user value of the property maxSavedStates . |
void |
resetName()
Resets the user value of the property name . |
void |
resetNextState()
Resets the user value of the property nextState . |
void |
resetPreviousState()
Resets the user value of the property previousState . |
void |
resetState()
Resets the user value of the property state . |
void |
setDebugFlags(int arg)
Sets the user value of the property debugFlags . |
void |
setMaxSavedStates(int arg)
Sets the user value of the property maxSavedStates . |
void |
setName(java.lang.String arg)
Sets the user value of the property name . |
void |
setNextState(java.lang.String arg)
Sets the user value of the property nextState . |
void |
setPreviousState(java.lang.String arg)
Sets the user value of the property previousState . |
void |
setState(java.lang.String arg)
Sets the user value of the property state . |
void |
start()
Start (or restart, after it has terminated) the finite state machine from the starting state. |
Methods inherited from class qx.core.Target |
---|
_dispatchEvent, addChangeSelectionListener, addChangeValueListener, addEventListener, addExecuteListener, addJavaEventListener, createDispatchChangeEvent, createDispatchDataEvent, createDispatchEvent, dispatchEvent, hasEventListeners, removeEventListener |
Methods inherited from class qx.core.Object |
---|
_disposeFields, _disposeObjectDeep, _disposeObjects, base, dispose, get, getDisposed, isDisposed, reset, self, set, toHashCode, toString_ |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FiniteStateMachine()
public FiniteStateMachine(java.lang.String machineName)
Method Detail |
---|
public void addObject(java.lang.String friendlyName, java.lang.Object obj, java.lang.Object groupNames)
Add an object (typically a widget) that is to be accessed during state transitions, to the finite state machine.
public void addState(State state)
Add a state to the finite state machine.
public Event copyEvent(Event event)
Copy an event
public void displayAllObjects()
Display all of the saved objects and their reverse mappings.
public void enqueueEvent(Event event, boolean bAddAtHead)
Enqueue an event for processing
public void eventListener(Event event)
Event listener for all event types in the finite state machine
public int getDebugFlags()
Returns the (computed) value of the property debugFlags
.
For further details take a look at the property definition: debugFlags
.
public java.lang.String getFriendlyName(java.lang.Object obj)
Get the friendly name of an object.
public java.lang.Object getGroupObjects(java.lang.String groupName)
Retrieve the list of objects which have registered, via addObject
as being members of the specified group.
public int getMaxSavedStates()
Returns the (computed) value of the property maxSavedStates
.
For further details take a look at the property definition: maxSavedStates
.
public java.lang.String getName()
Returns the (computed) value of the property name
.
For further details take a look at the property definition: name
.
public java.lang.String getNextState()
Returns the (computed) value of the property nextState
.
For further details take a look at the property definition: nextState
.
public java.lang.Object getObject(java.lang.String friendlyName)
Retrieve an object previously saved via addObject(java.lang.String, java.lang.Object, java.lang.Object)
, using its
Friendly Name.
public java.lang.String getPreviousState()
Returns the (computed) value of the property previousState
.
For further details take a look at the property definition: previousState
.
public java.lang.String getState()
Returns the (computed) value of the property state
.
For further details take a look at the property definition: state
.
public void initDebugFlags(int arg)
Calls the apply method and dispatches the change event of the property debugFlags
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: debugFlags
.
public void initMaxSavedStates(int arg)
Calls the apply method and dispatches the change event of the property maxSavedStates
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: maxSavedStates
.
public void initName(java.lang.String arg)
Calls the apply method and dispatches the change event of the property name
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: name
.
public void initNextState(java.lang.String arg)
Calls the apply method and dispatches the change event of the property nextState
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: nextState
.
public void initPreviousState(java.lang.String arg)
Calls the apply method and dispatches the change event of the property previousState
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: previousState
.
public void initState(java.lang.String arg)
Calls the apply method and dispatches the change event of the property state
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: state
.
public void postponeEvent(Event event)
Add the specified event to a list of events to be passed to the next state following state transition.
public void pushState(boolean bCurrent)
Save the current or previous state on the saved-state stack. A future transition can then provide, as its nextState value, the class constant:
qx.util.fsm.FiniteStateMachine.StateChange.POP_STATE_STACK
which will cause the next state to be whatever is at the top of the saved-state stack, and remove that top element from the saved-state stack.
public void removeObject(java.lang.String friendlyName)
Remove an object which had previously been added by addObject(java.lang.String, java.lang.Object, java.lang.Object)
.
public java.lang.Object replaceState(State state, boolean bDispose)
Replace a state in the finite state machine. This is useful if initially “dummy” states are created which load the real state table for a series of operations (and possibly also load the gui associated with the new states at the same time). Having portions of the finite state machine and their associated gui pages loaded at run time can help prevent long delays at application start-up time.
public void resetDebugFlags()
Resets the user value of the property debugFlags
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: debugFlags
.
public void resetMaxSavedStates()
Resets the user value of the property maxSavedStates
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: maxSavedStates
.
public void resetName()
Resets the user value of the property name
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: name
.
public void resetNextState()
Resets the user value of the property nextState
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: nextState
.
public void resetPreviousState()
Resets the user value of the property previousState
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: previousState
.
public void resetState()
Resets the user value of the property state
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: state
.
public void setDebugFlags(int arg)
Sets the user value of the property debugFlags
.
For further details take a look at the property definition: debugFlags
.
public void setMaxSavedStates(int arg)
Sets the user value of the property maxSavedStates
.
For further details take a look at the property definition: maxSavedStates
.
public void setName(java.lang.String arg)
Sets the user value of the property name
.
For further details take a look at the property definition: name
.
public void setNextState(java.lang.String arg)
Sets the user value of the property nextState
.
For further details take a look at the property definition: nextState
.
public void setPreviousState(java.lang.String arg)
Sets the user value of the property previousState
.
For further details take a look at the property definition: previousState
.
public void setState(java.lang.String arg)
Sets the user value of the property state
.
For further details take a look at the property definition: state
.
public void start()
Start (or restart, after it has terminated) the finite state machine from the starting state. The starting state is defined as the first state added to the finite state machine.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |