| Package | com.kapit.diagram.actions |
| Class | public class LinkAction |
| Inheritance | LinkAction ComplexAction Action |
| Property | Defined by | ||
|---|---|---|---|
| _acceptlinkcursor : Class
Icon to be displayed when link action is permitted and accepted.
| LinkAction | ||
![]() | _activated : Boolean = false
Activation status of this complex action.
| ComplexAction | |
![]() | _cursorid : int = -1
Cursor ID to be used by this complex action.
| ComplexAction | |
![]() | _id : String
ID reference of the action.
| Action | |
![]() | _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 | ||
![]() | _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 | ||
![]() | _view : DiagramView
The DiagramView where this action has been triggered.
| Action | |
| Method | Defined 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 | ||
![]() |
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 | ||
![]() |
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 | ||
![]() |
terminate(success:Boolean):void
Terminates the execution of this action with a termination status
equal to
success. | ComplexAction | |
![]() |
uiCompleted():void
| ComplexAction | |
| Method | Defined by | ||
|---|---|---|---|
|
acceptTarget(el:IDiagramElement, disp:DisplayObject):Boolean
Checks the target (a Diagram Element) validity and accepts it as an input link.
| LinkAction | ||
| _acceptlinkcursor | property |
protected var _acceptlinkcursor:ClassIcon to be displayed when link action is permitted and accepted.
| _outlinkcursor | property |
protected var _outlinkcursor:ClassIcon (circle) defining the outlink placement.
| _rejectlinkcursor | property |
protected var _rejectlinkcursor:ClassIcon to be displayed when link action is prohibitted and rejected.
| _ui | property |
protected var _ui:DrawLinkUI = nullDrawLinkUI used by the LinkAction to perform links drawing at runtime.
| LinkAction | () | constructor |
public function LinkAction()
Creates a new LinkAction instance having "link" as ID.
| 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):BooleanChecks the target (a Diagram Element) validity and accepts it as an input link.
Parametersel:IDiagramElement — Diagram Element to be accepeted as a target.
|
|
disp:DisplayObject — Display object
|
Boolean — True if target is accepted by the LinkAction.
|
| execute | () | method |
public override function execute(el:IDiagramElement = null, event:Event = null, args:Array = null):BooleanDraws the link that is beeing created as a DrawLinkUI object.
Parametersel: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.
|
Boolean — Termination status of the execution of this action.
|
| mouseDownHandler | () | method |
public function mouseDownHandler(event:MouseEvent):voidTerminates the current LinkAction by drawing the actual DiagramLink if the target object is accepted and aborts the execution of the LinkAction otherwise.
Parametersevent:MouseEvent — Detected mouse event.
|
| rollOut | () | method |
public override function rollOut(dob:IDiagramElement, event:MouseEvent):voidSets 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)
Parametersdob: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.
dob:IDiagramElement — Diagram Element calling this action event.
|
|
event:MouseEvent — Detected Mouse Event
|