Constructor
new module:caplin/trading/workbench/model/StateMachineMonitor(oStateModel)
A Stub class for testing the trade model.
Parameters:
Name | Type | Description |
---|---|---|
oStateModel |
Object | the state model. |
Methods
-
getAllStates() → {Array}
-
Returns all the states from the state model.
Returns:
- Type
- Array
-
getCurrentState() → {module:caplin/trading/statemachine/State}
-
Returns the current state.
Returns:
-
getStateModel() → {module:caplin/trading/statemachine/StateModel}
-
Returns the state model.
Returns:
-
setStateChangedListener()
-
Allows the user to register a listener that will be fired any time there is a state change.
-
setStateMachine(oStateMachine)
-
Sets the state machine we will be monitoring.
Parameters:
Name Type Description oStateMachine
Object -
setStateOrder(pStateOrder)
-
Sets the order of the states in the state monitor. Use this method only if you are using the
module:caplin/trading/workbench/ui/StateModelVisualiser
, it is not needed any more for themodule:caplin/trading/workbench/TradeStateVisualiser
.Parameters:
Name Type Description pStateOrder
Array an ordered array of the list of the states for the state monitor. -
stateChanged()