Packagecom.rubenswieringa.managers
Classpublic class StateManager

Class that enables you to keep track of which state (creationComplete, childrenCreated, etc.) a certain component is in. Note that StateManager is a singleton class.



Public Properties
 PropertyDefined by
  instance : StateManager
[static][read-only] Singleton instance.
StateManager
  items : Array
[read-only] Array with all items registered with this class.
StateManager
  LAST_STATE : int
[static][read-only] A reference to the last state (known to the StateManager class) a registered component can be in.
StateManager
Public Methods
 MethodDefined by
  
Constructor.
StateManager
  
getState(item:UIComponent):int
Returns a numeric value corresponding to one of the the constants in the StateManager class.
StateManager
  
register(item:UIComponent):void
Registers the provided UIComponent with this StateManager so that the component its state will be available through the getState method.
StateManager
Public Constants
 ConstantDefined by
  BABY : int = -1
[static] Indicates that a component has not reached the first state yet.
StateManager
  CREATION_COMPLETE : int = 2
[static] State indicating that a component has finished its construction, property processing, measuring, layout, and drawing.
StateManager
  INITIALIZE : int = 1
[static] State indicating that a component has finished its construction and has all initialization properties set.
StateManager
  PREINITIALIZE : int = 0
[static] State indicating that a component has begun with its initialization sequence.
StateManager
  UPDATE_COMPLETE : int = 3
[static] State indicating that a component has had its commitProperties(), measure(), and updateDisplayList() methods called.
StateManager
Property detail
instanceproperty
instance:StateManager  [read-only]

Singleton instance.

Implementation
    public static function get instance():StateManager
itemsproperty 
items:Array  [read-only]

Array with all items registered with this class.

Implementation
    public function get items():Array
LAST_STATEproperty 
LAST_STATE:int  [read-only]

A reference to the last state (known to the StateManager class) a registered component can be in.

Implementation
    public static function get LAST_STATE():int
Constructor detail
StateManager()constructor
public function StateManager()

Constructor.

Method detail
getState()method
public function getState(item:UIComponent):int

Returns a numeric value corresponding to one of the the constants in the StateManager class.

Parameters
item:UIComponent — Component of which to return the current state.

Returns
int — Value indicating the current state of the provided UIComponent.
register()method 
public function register(item:UIComponent):void

Registers the provided UIComponent with this StateManager so that the component its state will be available through the getState method.

Parameters
item:UIComponent — Component to register.

See also

Constant detail
BABYconstant
public static const BABY:int = -1

Indicates that a component has not reached the first state yet.

CREATION_COMPLETEconstant 
public static const CREATION_COMPLETE:int = 2

State indicating that a component has finished its construction, property processing, measuring, layout, and drawing.

INITIALIZEconstant 
public static const INITIALIZE:int = 1

State indicating that a component has finished its construction and has all initialization properties set.

PREINITIALIZEconstant 
public static const PREINITIALIZE:int = 0

State indicating that a component has begun with its initialization sequence.

UPDATE_COMPLETEconstant 
public static const UPDATE_COMPLETE:int = 3

State indicating that a component has had its commitProperties(), measure(), and updateDisplayList() methods called.