Packagecom.kapit.diagram.actions
Classpublic class DragLinkAction
InheritanceDragLinkAction 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
 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
  _dragging : Boolean = false
Dragging status (True if the draggibg operation is in progress.
DragLinkAction
  _group : DiagramGroup = null
The GroupDiagramObject to which the source Diagram Element belongs.
DragLinkAction
 Inherited_id : String
ID reference of the action.
Action
  _link : DiagramLink = null
The Link Diagram Object
DragLinkAction
 Inherited_manager : ActionsManager = null
ActionsManager dealing with the control of this action.
Action
 Inherited_source : IDiagramElement = null
The DiagramElement that has triggered this action.
Action
  _target : DiagramObject = null
The Target Diagram Element
DragLinkAction
 Inherited_view : DiagramView
The DiagramView where this action has been triggered.
Action
Public Methods
 MethodDefined by
  
Creates a DragLinkAction instance having "draglink"as ID.
DragLinkAction
  
abort():void
Terminates the execution of this action with success equal to false.
DragLinkAction
 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
Executes the tasks of this action.
DragLinkAction
  
mouseMoveHandler(event:MouseEvent):void
Starts the dragging operation and adds the selected DiagramObject to the view.
DragLinkAction
  
mouseUpHandler(event:MouseEvent):void
Releases the DiagramElement at the chosen region and terminates dragging if mouse up event is triggered.
DragLinkAction
 Inherited
removeCursor():void
Removes the used cursor.
ComplexAction
 Inherited
rollOut(dob:IDiagramElement, event:MouseEvent):void
Sets the roll out reaction given a DiagramElement and a mouse event.
ComplexAction
 Inherited
rollOver(dob:IDiagramElement, event:MouseEvent):void
Sets the roll over reaction given a DiagramElement and a mouse event.
ComplexAction
  
terminate(success:Boolean):void
Terminates the execution of this action with a termination status equal to success.
DragLinkAction
 Inherited
uiCompleted():void
ComplexAction
Protected Methods
 MethodDefined by
  
initPoints(source:DiagramObject, target:DiagramObject):Array
Specifies three points for drawing the link between a source and a target Diagram Elements (the source point, the target point and a middle point).
DragLinkAction
Property detail
_draggingproperty
protected var _dragging:Boolean = false

Dragging status (True if the draggibg operation is in progress.

_groupproperty 
protected var _group:DiagramGroup = null

The GroupDiagramObject to which the source Diagram Element belongs.

_linkproperty 
protected var _link:DiagramLink = null

The Link Diagram Object

_targetproperty 
protected var _target:DiagramObject = null

The Target Diagram Element

Constructor detail
DragLinkAction()constructor
public function DragLinkAction()

Creates a DragLinkAction instance having "draglink"as ID.

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

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

execute()method 
public override function execute(el:IDiagramElement = null, event:Event = null, args:Array = null):Boolean

Executes the tasks of this action. This action is executed when an GriddedButton of a GriddedButtonBar is selected and dragged by the user. This operation creates the specified DiagramElement in the view and draws the link between the source DiagramElement and the created one.

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.
initPoints()method 
protected function initPoints(source:DiagramObject, target:DiagramObject):Array

Specifies three points for drawing the link between a source and a target Diagram Elements (the source point, the target point and a middle point).

Parameters
source:DiagramObject — Source DiagramElement
 
target:DiagramObject — Target DiagramElement

Returns
Array — Array of three points defining the link parameters.
mouseMoveHandler()method 
public function mouseMoveHandler(event:MouseEvent):void

Starts the dragging operation and adds the selected DiagramObject to the view. The release of the down button leads the dragging operation to terminate.

Parameters
event:MouseEvent — Detected Mouse Event.
mouseUpHandler()method 
public function mouseUpHandler(event:MouseEvent):void

Releases the DiagramElement at the chosen region and terminates dragging if mouse up event is triggered.

Parameters
event:MouseEvent — detected MouseEvent
terminate()method 
public override function terminate(success:Boolean):void

Terminates the execution of this action with a termination status equal to success. A true value of the success parameter indicates that the action has been successfuly finished, while a false value indicates that the action has been aborted.

Parameters
success:Boolean — Termination status of this action. A true value indicates that this action has been successfuly finished, while a false value indicates that the action has been aborted.