Packagecom.kapit.diagram.actions
Classpublic class ActionsManager



Public Properties
 PropertyDefined by
  activeaction : Action
[read-only] The active action that is currently handeled by the ActionsManager.
ActionsManager
  activetool : String
ID of the Active tool that is currently used by the ActionsManager.
ActionsManager
  keyboardenabled : Boolean
Indicates whether key board actions are enabled and considered by the ActionsManager.
ActionsManager
  selectionenabled : Boolean
Indicates whether selection is enabled by the ActionsManager.
ActionsManager
Protected Properties
 PropertyDefined by
  _actions : Object = null
Array of supported Action class instances (like abort action, delete action...).
ActionsManager
  _activeaction : ComplexAction = null
The active action that is currently handeled by the ActionsManager.
ActionsManager
  _activetool : IDiagramTool = null
Active IDIagramTool used in the current Diagram View
ActionsManager
  _defaulttool : IDiagramTool = null
IDiagramTool used by default used in the current Diagram View.
ActionsManager
  _keyboardenabled : Boolean = false
True if keyborad events must be considered by this ActionManager.
ActionsManager
  _tools : Object = null
Array of supported IDiagramTool class instances (supported Diagram Tools like select tool, fill tool...).
ActionsManager
  _view : DiagramView
DiagramView in which actions are controlled and managed by the ActionsManager.
ActionsManager
Public Methods
 MethodDefined by
  
Creates a new ActionsManager instance which will manage the actions triggered in the DiagramView object view.
ActionsManager
  
abort():void
Aborts the execution of any active action and activates the activetool.
ActionsManager
  
addAction(action:Action):void
Adds a new Action instance supported by the ActionsManager.
ActionsManager
  
addTool(tool:IDiagramTool):void
Adds a new IDiagramTool object to the list of supported IDiagramTool array.
ActionsManager
  
execute(triggerid:String):Boolean
Executes the tasks of an action identified by its ID.
ActionsManager
  
getAction(id:String):Action
Retruns a supported Action instance and returns null if the action is not supported.
ActionsManager
  
getTool(id:String):Action
Returns the supported IDiagramElement given its ID (null if not supported).
ActionsManager
  
ActionsManager
  
removeAction(id:String):void
Removes an Action instance supported by the ActionManager given its ID.
ActionsManager
  
removeTool(id:String):void
Removes an IDiagramTool from the list of supported IDiagramTool array.
ActionsManager
  
rollOut(triggerid:String, dob:IDiagramElement, event:MouseEvent):void
Sets the roll out reaction given a Diagram Element, a mouse event and a triggered action.
ActionsManager
  
rollOver(triggerid:String, dob:IDiagramElement, event:MouseEvent):void
Sets the roll over reaction given a Diagram Element, a mouse event and a triggered action (given its id).
ActionsManager
  
terminate(action:Action):void
Terminates the active action execution and activates the current view.
ActionsManager
  
triggerAction(triggerid:String, dob:IDiagramElement, event:MouseEvent, args:Array = null):void
Defines an new active action and executes it.
ActionsManager
  
updateCursor():void
ActionsManager
Protected Methods
 MethodDefined by
  
keyUpHandler(event:KeyboardEvent):void
Handles any keyboard event and executes it according to the supported keyboard actions (contained in the actions array).
ActionsManager
Property detail
_actionsproperty
protected var _actions:Object = null

Array of supported Action class instances (like abort action, delete action...).

_activeactionproperty 
protected var _activeaction:ComplexAction = null

The active action that is currently handeled by the ActionsManager.

activeactionproperty 
activeaction:Action  [read-only]

The active action that is currently handeled by the ActionsManager.

Implementation
    public function get activeaction():Action
_activetoolproperty 
protected var _activetool:IDiagramTool = null

Active IDIagramTool used in the current Diagram View

activetoolproperty 
activetool:String  [read-write]

ID of the Active tool that is currently used by the ActionsManager.

Implementation
    public function get activetool():String
    public function set activetool(value:String):void
_defaulttoolproperty 
protected var _defaulttool:IDiagramTool = null

IDiagramTool used by default used in the current Diagram View.

_keyboardenabledproperty 
protected var _keyboardenabled:Boolean = false

True if keyborad events must be considered by this ActionManager.

keyboardenabledproperty 
keyboardenabled:Boolean  [read-write]

Indicates whether key board actions are enabled and considered by the ActionsManager.

Implementation
    public function get keyboardenabled():Boolean
    public function set keyboardenabled(value:Boolean):void
selectionenabledproperty 
selectionenabled:Boolean  [read-write]

Indicates whether selection is enabled by the ActionsManager.

Implementation
    public function get selectionenabled():Boolean
    public function set selectionenabled(value:Boolean):void
_toolsproperty 
protected var _tools:Object = null

Array of supported IDiagramTool class instances (supported Diagram Tools like select tool, fill tool...).

_viewproperty 
protected var _view:DiagramView

DiagramView in which actions are controlled and managed by the ActionsManager.

Constructor detail
ActionsManager()constructor
public function ActionsManager(view:DiagramView)

Creates a new ActionsManager instance which will manage the actions triggered in the DiagramView object view.

Parameters
view:DiagramView — A DiagramView object.
Method detail
abort()method
public function abort():void

Aborts the execution of any active action and activates the activetool.

addAction()method 
public function addAction(action:Action):void

Adds a new Action instance supported by the ActionsManager.

Parameters
action:Action — New Action to be added.
addTool()method 
public function addTool(tool:IDiagramTool):void

Adds a new IDiagramTool object to the list of supported IDiagramTool array.

Parameters
tool:IDiagramTool — New IDiagram Tool.
execute()method 
public function execute(triggerid:String):Boolean

Executes the tasks of an action identified by its ID. This method does not support the execution of ComplexActions.

Parameters
triggerid:String — ID of the action to be executed.

Returns
Boolean — The Action success status.
getAction()method 
public function getAction(id:String):Action

Retruns a supported Action instance and returns null if the action is not supported.

Parameters
id:String — Action ID.

Returns
Action — Requested Action instance.
getTool()method 
public function getTool(id:String):Action

Returns the supported IDiagramElement given its ID (null if not supported).

Parameters
id:String — IDiagramElement ID

Returns
Action — IDiagramTool class
keyUpHandler()method 
protected function keyUpHandler(event:KeyboardEvent):void

Handles any keyboard event and executes it according to the supported keyboard actions (contained in the actions array).

Parameters
event:KeyboardEvent — Detected KeyboardAction.
reActivateDefaultTool()method 
public function reActivateDefaultTool():void
removeAction()method 
public function removeAction(id:String):void

Removes an Action instance supported by the ActionManager given its ID.

Parameters
id:String — ID of the Action instance to be removed.
removeTool()method 
public function removeTool(id:String):void

Removes an IDiagramTool from the list of supported IDiagramTool array.

Parameters
id:String — IDiagram Tool ID of the IDiagramTool to be removed.
rollOut()method 
public function rollOut(triggerid:String, dob:IDiagramElement, event:MouseEvent):void

Sets the roll out reaction given a Diagram Element, a mouse event and a triggered action. By default, the ActiveAction (if not null) will be considered.

Parameters
triggerid:String — ID of the triggered action (action supported by this ActionsManager).
 
dob:IDiagramElement — Diagram Element calling this action event.
 
event:MouseEvent — Detected Mouse Event
rollOver()method 
public function rollOver(triggerid:String, dob:IDiagramElement, event:MouseEvent):void

Sets the roll over reaction given a Diagram Element, a mouse event and a triggered action (given its id). By default, the ActiveAction (if not null) will be considered.

Parameters
triggerid:String — ID of the triggered action (action supported by this ActionsManager).
 
dob:IDiagramElement — Diagram Element calling this action event.
 
event:MouseEvent — Detected Mouse Event
terminate()method 
public function terminate(action:Action):void

Terminates the active action execution and activates the current view.

Parameters
action:Action — Active Action
triggerAction()method 
public function triggerAction(triggerid:String, dob:IDiagramElement, event:MouseEvent, args:Array = null):void

Defines an new active action and executes it.

Parameters
triggerid:String — ID of the action to trigger (action supported by this ActionsManager).
 
dob:IDiagramElement — Diagram Element calling this action event.
 
event:MouseEvent — Detected Mouse Event.
 
args:Array (default = null) — Action parameters.
updateCursor()method 
public function updateCursor():void