Packagecom.kapit.diagram.actions
Classpublic class LinkAction
InheritanceLinkAction Inheritance ComplexAction Inheritance Action



Public Properties
 PropertyDefined by
 Inheritedactivated : Boolean
Indicates whether this ComplexAction is activated or not.
ComplexAction
 Inheritedid : String
ID of this action.
Action
 Inheritedmanager : ActionsManager
The ActionsManager instance controlling this action (cursors, properties...).
Action
 Inheritedsource : IDiagramElement
The DiagramElement instance that has triggered this action.
Action
 Inheritedview : DiagramView
The DiagramView instance where this action has been triggered.
Action
Protected Properties
 PropertyDefined by
  _acceptlinkcursor : Class
Icon to be displayed when link action is permitted and accepted.
LinkAction
 Inherited_activated : Boolean = false
Activation status of this complex action.
ComplexAction
 Inherited_cursorid : int = -1
Cursor ID to be used by this complex action.
ComplexAction
 Inherited_id : String
ID reference of the action.
Action
 Inherited_manager : ActionsManager = null
ActionsManager dealing with the control of this action.
Action
  _outlinkcursor : Class
Icon (circle) defining the outlink placement.
LinkAction
  _rejectlinkcursor : Class
Icon to be displayed when link action is prohibitted and rejected.
LinkAction
 Inherited_source : IDiagramElement = null
The DiagramElement that has triggered this action.
Action
  _ui : DrawLinkUI = null
DrawLinkUI used by the LinkAction to perform links drawing at runtime.
LinkAction
 Inherited_view : DiagramView
The DiagramView where this action has been triggered.
Action
Public Methods
 MethodDefined by
  
Creates a new LinkAction instance having "link" as ID.
LinkAction
  
abort():void
Terminates the execution of this action with success equal to false.
LinkAction
 Inherited
changeCursor(cursorclass:Class, dx:Number, dy:Number):void
Changes the current cursor.
ComplexAction
  
execute(el:IDiagramElement = null, event:Event = null, args:Array = null):Boolean
Draws the link that is beeing created as a DrawLinkUI object.
LinkAction
  
mouseDownHandler(event:MouseEvent):void
Terminates the current LinkAction by drawing the actual DiagramLink if the target object is accepted and aborts the execution of the LinkAction otherwise.
LinkAction
 Inherited
removeCursor():void
Removes the used cursor.
ComplexAction
  
rollOut(dob:IDiagramElement, event:MouseEvent):void
Sets the roll out reaction given a DiagramElement and a mouse event.
LinkAction
  
rollOver(dob:IDiagramElement, event:MouseEvent):void
Sets the roll over reaction given a DiagramElement and a mouse event.
LinkAction
 Inherited
terminate(success:Boolean):void
Terminates the execution of this action with a termination status equal to success.
ComplexAction
 Inherited
uiCompleted():void
ComplexAction
Protected Methods
 MethodDefined by
  
acceptTarget(el:IDiagramElement, disp:DisplayObject):Boolean
Checks the target (a Diagram Element) validity and accepts it as an input link.
LinkAction
Property detail
_acceptlinkcursorproperty
protected var _acceptlinkcursor:Class

Icon to be displayed when link action is permitted and accepted.

_outlinkcursorproperty 
protected var _outlinkcursor:Class

Icon (circle) defining the outlink placement.

_rejectlinkcursorproperty 
protected var _rejectlinkcursor:Class

Icon to be displayed when link action is prohibitted and rejected.

_uiproperty 
protected var _ui:DrawLinkUI = null

DrawLinkUI used by the LinkAction to perform links drawing at runtime.

Constructor detail
LinkAction()constructor
public function LinkAction()

Creates a new LinkAction instance having "link" as ID.

Method detail
abort()method
public override function abort():void

Terminates the execution of this action with success equal to false.

acceptTarget()method 
protected function acceptTarget(el:IDiagramElement, disp:DisplayObject):Boolean

Checks the target (a Diagram Element) validity and accepts it as an input link.

Parameters
el:IDiagramElement — Diagram Element to be accepeted as a target.
 
disp:DisplayObject — Display object

Returns
Boolean — True if target is accepted by the LinkAction.
execute()method 
public override function execute(el:IDiagramElement = null, event:Event = null, args:Array = null):Boolean

Draws the link that is beeing created as a DrawLinkUI object.

Parameters
el:IDiagramElement (default = null) — DiagramElement instance where this action has been triggered.
 
event:Event (default = null) — The triggered Event.
 
args:Array (default = null) — Parameters used in the execution of this action.

Returns
Boolean — Termination status of the execution of this action.
mouseDownHandler()method 
public function mouseDownHandler(event:MouseEvent):void

Terminates the current LinkAction by drawing the actual DiagramLink if the target object is accepted and aborts the execution of the LinkAction otherwise.

Parameters
event:MouseEvent — Detected mouse event.
rollOut()method 
public override function rollOut(dob:IDiagramElement, event:MouseEvent):void

Sets the roll out reaction given a DiagramElement and a mouse event. Given the activation status, the cursor can be reject-link cursor (if the LinkAction is activated (outside of the target)) or removed if else (link drawing finalized)

Parameters
dob:IDiagramElement — Diagram Element calling this action event.
 
event:MouseEvent — Detected Mouse Event
rollOver()method 
public override function rollOver(dob:IDiagramElement, event:MouseEvent):void

Sets the roll over reaction given a DiagramElement and a mouse event. Given the activation status the cursor status can be changed from reject-link to accept-link cursor (according to acceptTarget results). Losing activation refers to a new link drawing action that starts by specifying the outlink cursor from the source Diagram Element.

Parameters
dob:IDiagramElement — Diagram Element calling this action event.
 
event:MouseEvent — Detected Mouse Event