Packageat.managers
Classpublic class HistoryManager
InheritanceHistoryManager Inheritance flash.events.EventDispatcher
ImplementsIHistoryManager
SubclassesApplicationHistoryManager, CrumbManager



Public Properties
 PropertyDefined by
  allStates : Array
[read-only]
HistoryManager
  currentID : int
[read-only] Bindable Getter of the current id associated with the current state
HistoryManager
  currentLabel : String = ""
HistoryManager
  currentState : Object
[read-only] getter of the current state
HistoryManager
  debugMode : Boolean = false
HistoryManager
  preventSave : Boolean = false
HistoryManager
Protected Properties
 PropertyDefined by
  _currentPos : int
Allows setting internally of __currentPos varaible.
HistoryManager
  states : Array = null
HistoryManager
Public Methods
 MethodDefined by
  
Creates a new instance of IHistoryManager interface
HistoryManager
  
back(howFar:int = 1):Boolean
Moves the history Manager backward by the specified number of positions and dispatches a HistoryChangedEvent
HistoryManager
  
clear(dispatchChangeEvent:Boolean = true):void
HistoryManager
  
forward(howFar:uint = 1):Boolean
Moves the History Manager forward by the specified number of positions and dispatches a HistoryChangedEvent
HistoryManager
  
getNextState():Object
HistoryManager
  
HistoryManager
  
getStateById(id:int):Object
Returns the state associated with the specified id
HistoryManager
  
getStateIndex(state:Object):int
HistoryManager
  
gotoState(id:int):Boolean
Moves the History Manager to the state associated with the specified id and dispatches a HistoryChangedEvent
HistoryManager
  
init():void
Initializes/Resets the History Manager
HistoryManager
  
save(label:String, state:Object):void
Appends the specified state behind the state at the currentPosition.
HistoryManager
  
saveAt(index:uint, label:String, state:Object):void
HistoryManager
  
saveList(arrayOfObjectsWithLabelAndStateValues:Array):void
HistoryManager
  
saveListAt(index:uint, arrayOfObjectsWithLabelAndStateValues:Array):void
HistoryManager
Property detail
allStatesproperty
allStates:Array  [read-only]Implementation
    public function get allStates():Array
currentIDproperty 
currentID:int  [read-only]

Bindable Getter of the current id associated with the current state

This property can be used as the source for data binding.

Implementation
    public function get currentID():int
currentLabelproperty 
public var currentLabel:String = ""

This property can be used as the source for data binding.

_currentPosproperty 
_currentPos:int  [read-write]

Allows setting internally of __currentPos varaible. Do not edit __currentPos anywhere else

Implementation
    protected function get _currentPos():int
    protected function set _currentPos(value:int):void
currentStateproperty 
currentState:Object  [read-only]

getter of the current state

Implementation
    public function get currentState():Object
debugModeproperty 
public var debugMode:Boolean = false
preventSaveproperty 
public var preventSave:Boolean = false
statesproperty 
protected var states:Array = null
Constructor detail
HistoryManager()constructor
public function HistoryManager()

Creates a new instance of IHistoryManager interface

Method detail
back()method
public function back(howFar:int = 1):Boolean

Moves the history Manager backward by the specified number of positions and dispatches a HistoryChangedEvent

Parameters
howFar:int (default = 1) — specifies how many states backward to move (default is 1)

Returns
Boolean — true if a state exists at the resulting index when the backward move is subtracted, false otherwise.
clear()method 
public function clear(dispatchChangeEvent:Boolean = true):voidParameters
dispatchChangeEvent:Boolean (default = true)
forward()method 
public function forward(howFar:uint = 1):Boolean

Moves the History Manager forward by the specified number of positions and dispatches a HistoryChangedEvent

Parameters
howFar:uint (default = 1) — specifies how many states forward to move (default is 1)

Returns
Boolean — true if a state exists at the resulting index when the forward amount is added, false otherwise.
getNextState()method 
public function getNextState():Object

Returns
Object
getPreviousState()method 
public function getPreviousState():Object

Returns
Object
getStateById()method 
public function getStateById(id:int):Object

Returns the state associated with the specified id

Parameters
id:int — the id associated with the state being requested

Returns
Object — the state associated with the specified id
getStateIndex()method 
public function getStateIndex(state:Object):intParameters
state:Object

Returns
int
gotoState()method 
public function gotoState(id:int):Boolean

Moves the History Manager to the state associated with the specified id and dispatches a HistoryChangedEvent

Parameters
id:int — of the state to go to

Returns
Boolean — true if the id is associated with a state, otherwise false
init()method 
public function init():void

Initializes/Resets the History Manager

save()method 
public function save(label:String, state:Object):void

Appends the specified state behind the state at the currentPosition. NOTE: All forward states (if any) from the current position are wiped out.

Parameters
label:String — that represents the state (Label is Bindable for UI)
 
state:Object — object that represents a state
saveAt()method 
public function saveAt(index:uint, label:String, state:Object):voidParameters
index:uint
 
label:String
 
state:Object
saveList()method 
public function saveList(arrayOfObjectsWithLabelAndStateValues:Array):voidParameters
arrayOfObjectsWithLabelAndStateValues:Array
saveListAt()method 
public function saveListAt(index:uint, arrayOfObjectsWithLabelAndStateValues:Array):voidParameters
index:uint
 
arrayOfObjectsWithLabelAndStateValues:Array