Package | twaver.network.interaction |
Class | public class CreateOrthogonalLinkInteractionHandler |
Inheritance | CreateOrthogonalLinkInteractionHandler ![]() ![]() ![]() |
Here is an example how to install interaction handlers on network canvas
network.interactionHandlers = new Collection([ new SelectInteractionHandler(network), new EditInteractionHandler(network), new MoveInteractionHandler(network), new DefaultInteractionHandler(network), new MapFilterInteractionHandler(network), ]);
See also
Method | Defined By | ||
---|---|---|---|
CreateOrthogonalLinkInteractionHandler(network:Network, linkClass:Class = null, callback:Function = null, linkType:String = null, isByControlPoint:Boolean = false, value:Number = -1, splitByPercent:Boolean = false)
Constructor. | CreateOrthogonalLinkInteractionHandler | ||
![]() | installListeners():void [override]
Install listeners on this interaction. | CreateLinkInteractionHandler | |
![]() | uninstallListeners():void [override]
Uninstall listeners on this interaction. | CreateLinkInteractionHandler |
Method | Defined By | ||
---|---|---|---|
![]() | clear():void
Clear all mouse drag-and-drop information and the
trace mark painted on network canvas. | CreateLinkInteractionHandler | |
[override]
Create link after "from node" and "to node" are both
selected by mouse. | CreateOrthogonalLinkInteractionHandler | ||
![]() | dispatchEvent(kind:String, e:MouseEvent, element:IElement = null, resizeDirection:String = null, pointIndex:int = -1):void
Dispatch event to listeners. | BasicInteractionHandler | |
drawPoints(g:Graphics, sourceBounds:Rectangle):void [override]
Draw line on graphics. | CreateOrthogonalLinkInteractionHandler | ||
![]() | getFromNode(e:MouseEvent):Node
Get "from node" selected by mouse during creating link
on canvas. | CreateLinkInteractionHandler | |
![]() |
Get "to node" selected by mouse during creating link
on canvas. | CreateLinkInteractionHandler | |
![]() | handleMouseDown(e:MouseEvent):void
This method handle the mouse down event. | CreateLinkInteractionHandler | |
![]() | handleMouseMove(e:MouseEvent):void
This method handle mouse move event. | CreateLinkInteractionHandler | |
![]() | updateMark():void
This method draw and update the trace mark
on network canvas to show the link trace between from
and mouse cursor location when moving mouse cursor around on
network canvas to pick "to node". | CreateLinkInteractionHandler |
CreateOrthogonalLinkInteractionHandler | () | Constructor |
public function CreateOrthogonalLinkInteractionHandler(network:Network, linkClass:Class = null, callback:Function = null, linkType:String = null, isByControlPoint:Boolean = false, value:Number = -1, splitByPercent:Boolean = false)
Constructor. Create an orthogonal link interaction handler for this network. Handler will create specified link class instance with specified link type.
Parametersnetwork:Network — the network this handler will work with.
| |
linkClass:Class (default = null ) — the new created link class type
| |
callback:Function (default = null ) — this will be called when link is created.
| |
linkType:String (default = null ) — link type of the new created link.
| |
isByControlPoint:Boolean (default = false ) — link.setStyle(Styles.LINK_CONTROL_POINT,controlPoint);
| |
value:Number (default = -1 ) — link.setStyle(Styles.LINK_SPLIT_PERCENT,value);
| |
splitByPercent:Boolean (default = false ) — link.setStyle(Styles.LINK_SPLIT_BY_PERCENT,splitByPercent);
|
createLink | () | method |
override protected function createLink():Link
Create link after "from node" and "to node" are both selected by mouse. A link will be created between this from node and to node.
ReturnsLink — the created link instance.
|
drawPoints | () | method |
override protected function drawPoints(g:Graphics, sourceBounds:Rectangle):void
Draw line on graphics.
Parameters
g:Graphics — the graphics
| |
sourceBounds:Rectangle — point location.
|