Packagecom.degrafa.states
Classpublic class StateManager

The StateManager manages states for a IDegrafaStateClients. This object is not intended to be accessed directly. Degrafa states work very much like Flex 2 or 3 built in states. For further details reffer to the Flex 2 or 3 documentation.



Public Properties
 PropertyDefined by
  currentState : String
The current view state.
StateManager
Public Methods
 MethodDefined by
  
Constructor.
StateManager
  
applyState(stateName:String, lastState:String):void
Applys the passed state.
StateManager
  
Commits the current state making it the active state.
StateManager
  
findCommonBaseState(state1:String, state2:String):String
Returns the name of the common base state shared between state1 and state2.
StateManager
  
getBaseStates(state:State):Array
Returns an array of base states
StateManager
  
getState(stateName:String):State
Return the state object with the given name.
StateManager
  
initializeState(stateName:String):void
Initializes the passed state.
StateManager
  
isBaseState(stateName:String):Boolean
Returns true if the passed state is the base state.
StateManager
  
removeState(stateName:String, lastState:String):void
Removes the passed state from the collection of states.
StateManager
  
setCurrentState(stateName:String):void
Sets the current state for this view.
StateManager
Property detail
currentStateproperty
currentState:String  [read-write]

The current view state.

Implementation
    public function get currentState():String
    public function set currentState(value:String):void
Constructor detail
StateManager()constructor
public function StateManager(stateClient:IDegrafaStateClient)

Constructor.

Parameters
stateClient:IDegrafaStateClient
Method detail
applyState()method
public function applyState(stateName:String, lastState:String):void

Applys the passed state. Making it the current state.

Parameters
stateName:String
 
lastState:String
commitCurrentState()method 
public function commitCurrentState():void

Commits the current state making it the active state.

findCommonBaseState()method 
public function findCommonBaseState(state1:String, state2:String):String

Returns the name of the common base state shared between state1 and state2.

Parameters
state1:String
 
state2:String

Returns
String
getBaseStates()method 
public function getBaseStates(state:State):Array

Returns an array of base states

Parameters
state:State

Returns
Array
getState()method 
public function getState(stateName:String):State

Return the state object with the given name.

Parameters
stateName:String

Returns
State
initializeState()method 
public function initializeState(stateName:String):void

Initializes the passed state.

Parameters
stateName:String
isBaseState()method 
public function isBaseState(stateName:String):Boolean

Returns true if the passed state is the base state.

Parameters
stateName:String

Returns
Boolean
removeState()method 
public function removeState(stateName:String, lastState:String):void

Removes the passed state from the collection of states.

Parameters
stateName:String
 
lastState:String
setCurrentState()method 
public function setCurrentState(stateName:String):void

Sets the current state for this view.

Parameters
stateName:String