Packagefr.kapit.pictogram.actions
Classpublic class ActionsManager
InheritanceActionsManager Inheritance Object

This class is used internally by the pictogramChart to manage actions and should not be used directly.



Public Methods
 MethodDefined By
  
Constructor.
ActionsManager
  
activate(actionID:String):void
Activates the action that has the id actionID by changing its status to activated.
ActionsManager
  
deactivate(actionID:String):void
Deactivates the action that has the id actionID by changing its status to deactivated.
ActionsManager
  
Deactivates all the actions: all the hibernated and activated actions.
ActionsManager
  
getActionByID(actionID:String):IAction
Returns the registered action that has the id actionID.
ActionsManager
  
getActionData(actionID:String):Object
Returns the id of the action defined by the id actionID.
ActionsManager
  
Returns an array of the ids of the registered actions.
ActionsManager
  
getActionStatus(actionID:String):String
Returns the status of the action defined by the id actionID.
ActionsManager
  
hasAction(actionID:String):Boolean
Indicates whether the actions manager has a registered action that has the id actionID.
ActionsManager
  
hibernate(actionID:String):void
Hibernates the action that has the id actionID by changing its status to hibernated.
ActionsManager
  
Hibernates all the active actions.
ActionsManager
  
register(actionClass:Class):String
Creates a new action by instantiating actionClass.
ActionsManager
  
sendMessage(message:Object, actionID:String = null):void
Sends a message to the action that has the id actionID or to all the registered actions if the actionID parameter is null.
ActionsManager
  
setData(actionID:String, data:Object = null):void
Sets the data of the action that has the id actionID.
ActionsManager
  
unregister(actionID:String):void
Unregisters the action that has the id actionID.
ActionsManager
  
Deactivates all the actions: all the hibernated and activated actions.
ActionsManager
  
update(actionID:String, data:Object = null):void
Updates the action properties using its data.
ActionsManager
  
wakeUp(actionID:String):void
Wakes up the action that has the id actionID by changing its status from hibernated to activated.
ActionsManager
  
Wakes up all the hibernated actions.
ActionsManager
Constructor Detail
ActionsManager()Constructor
public function ActionsManager(pictogramChart:PictogramChart)

Constructor.

Parameters
pictogramChart:PictogramChart
Method Detail
activate()method
public function activate(actionID:String):void

Activates the action that has the id actionID by changing its status to activated. If this action is exclusive, other actions will be hibernated.

Parameters

actionID:String — the id of the action to be deactivated.


Throws
PictogramError — if there is no registered action with the given id.
deactivate()method 
public function deactivate(actionID:String):void

Deactivates the action that has the id actionID by changing its status to deactivated.

Parameters

actionID:String — the id of the action to be deactivated.


Throws
PictogramError — if there is no registered action with the given id.
deactivateAllActions()method 
public function deactivateAllActions():void

Deactivates all the actions: all the hibernated and activated actions.

getActionByID()method 
public function getActionByID(actionID:String):IAction

Returns the registered action that has the id actionID.

Parameters

actionID:String — the id of the action to be looked for.

Returns
IAction — the registered action that has the id actionID if it exists and null otherwise.
getActionData()method 
public function getActionData(actionID:String):Object

Returns the id of the action defined by the id actionID.

Parameters

actionID:String — the id of the action.

Returns
Object — the data of the action.

Throws
PictogramError — if there is no registered action with the given id.
getActionsIDs()method 
public function getActionsIDs():Array

Returns an array of the ids of the registered actions.

Returns
Array — an array of the ids of the registered actions.
getActionStatus()method 
public function getActionStatus(actionID:String):String

Returns the status of the action defined by the id actionID. An action can be UNREGISTERED, DEACTIVATED, ACTIVATED or HIBERNATED.

Parameters

actionID:String — the id of the action.

Returns
String — the status of the action.

Throws
PictogramError — if there is no registered action with the given id.

See also

fr.kapit.pictogram.actions.Action.UNREGISTERED
fr.kapit.pictogram.actions.Action.DEACTIVATED
fr.kapit.pictogram.actions.Action.ACTIVATED
fr.kapit.pictogram.actions.Action.HIBERNATED
hasAction()method 
public function hasAction(actionID:String):Boolean

Indicates whether the actions manager has a registered action that has the id actionID.

Parameters

actionID:String — the id of the action.

Returns
Boolean — true if the action is registered.
hibernate()method 
public function hibernate(actionID:String):void

Hibernates the action that has the id actionID by changing its status to hibernated.

Parameters

actionID:String — the id of the action to be hibernated.


Throws
PictogramError — if there is no registered action with the given id.
 
PictogramError — if the action is exclusive.
hibernateActiveActions()method 
public function hibernateActiveActions():void

Hibernates all the active actions. Exclusive actions will be deactivated instead because they can't be hibernated. Please not that the KeyBoardAction can not be hibernated.

register()method 
public function register(actionClass:Class):String

Creates a new action by instantiating actionClass. The new action must have a non null id property. After its creation, the action will have a DEACTIVATED status.

Parameters

actionClass:Class — the class from which to create an instance of

Returns
String — the id of the action that has been registered.

Throws
PictogramError — if action id is null.
sendMessage()method 
public function sendMessage(message:Object, actionID:String = null):void

Sends a message to the action that has the id actionID or to all the registered actions if the actionID parameter is null.

Parameters

message:Object — the message to be sent.
 
actionID:String (default = null) — the id of the action that will recieve the message.

setData()method 
public function setData(actionID:String, data:Object = null):void

Sets the data of the action that has the id actionID.

Parameters

actionID:String — the id of the action where the data will be changed.
 
data:Object (default = null) — the data to be set.


Throws
PictogramError — if there is no registered action with the given id.
unregister()method 
public function unregister(actionID:String):void

Unregisters the action that has the id actionID. If this action is activated or hibernated, it will be deactivated first using the deactivate() method. If this action is exclusive, other actions will be hibernated.

Parameters

actionID:String — the id of the action to be deactivated.

See also

unregisterAllActions()method 
public function unregisterAllActions():void

Deactivates all the actions: all the hibernated and activated actions.

update()method 
public function update(actionID:String, data:Object = null):void

Updates the action properties using its data. If the parameter data is not null, the data property of the action will be canged before the update. However, if the parameter data is null, the current value of the data property of the action will not be changed.

Parameters

actionID:String — the id of the action to be updated.
 
data:Object (default = null) — the data to be set to the action before the update.


Throws
PictogramError — if there is no registered action with the given id.
wakeUp()method 
public function wakeUp(actionID:String):void

Wakes up the action that has the id actionID by changing its status from hibernated to activated.

Parameters

actionID:String — the id of the action to be woken up.


Throws
PictogramError — if there is no registered action with the given id.
wakeUpHibernatedActions()method 
public function wakeUpHibernatedActions():void

Wakes up all the hibernated actions.