Package | twaver.network.interaction |
Class | public class CreateShapeNodeInteractionHandler |
Inheritance | CreateShapeNodeInteractionHandler ![]() ![]() |
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
Property | Defined By | ||
---|---|---|---|
currentPoint : Point = null | CreateShapeNodeInteractionHandler | ||
mark : UIComponent = null | CreateShapeNodeInteractionHandler | ||
![]() | network : Network [read-only]
Get network component of this interaction. | BasicInteractionHandler | |
points : ICollection = null | CreateShapeNodeInteractionHandler | ||
shapeNodeClass : Class [read-only]
Get the new created shape node class type. | CreateShapeNodeInteractionHandler |
Method | Defined By | ||
---|---|---|---|
CreateShapeNodeInteractionHandler(network:Network, shapeNodeClass:Class = null)
Create shape node interaction handler for specified network and class type. | CreateShapeNodeInteractionHandler | ||
installListeners():void [override]
Install listeners on this interaction. | CreateShapeNodeInteractionHandler | ||
uninstallListeners():void [override]
Uninstall listeners on this interaction. | CreateShapeNodeInteractionHandler |
Method | Defined By | ||
---|---|---|---|
clear():void
Clear all mark draw on network canvas and the mouse points. | CreateShapeNodeInteractionHandler | ||
Create shape node instance and return. | CreateShapeNodeInteractionHandler | ||
![]() | dispatchEvent(kind:String, e:MouseEvent, element:IElement = null, resizeDirection:String = null, pointIndex:int = -1):void
Dispatch event to listeners. | BasicInteractionHandler | |
handleMouseDown(e:MouseEvent):void
This method handle mouse down event. | CreateShapeNodeInteractionHandler | ||
handleMouseMove(e:MouseEvent):void
This method handle the mouse moved event. | CreateShapeNodeInteractionHandler | ||
updateMark():void
Update all painted mark on network canvas. | CreateShapeNodeInteractionHandler |
currentPoint | property |
protected var currentPoint:Point = null
mark | property |
protected var mark:UIComponent = null
points | property |
protected var points:ICollection = null
shapeNodeClass | property |
shapeNodeClass:Class
[read-only] Get the new created shape node class type.
protected function get shapeNodeClass():Class
CreateShapeNodeInteractionHandler | () | Constructor |
public function CreateShapeNodeInteractionHandler(network:Network, shapeNodeClass:Class = null)
Create shape node interaction handler for specified network and class type.
Parametersnetwork:Network — the network this interaction handler will work with.
| |
shapeNodeClass:Class (default = null ) — the new created shape node class type.
|
clear | () | method |
protected function clear():void
Clear all mark draw on network canvas and the mouse points.
createShapeNode | () | method |
protected function createShapeNode():ShapeNode
Create shape node instance and return.
ReturnsShapeNode — the new create shape node instance.
|
handleMouseDown | () | method |
protected function handleMouseDown(e:MouseEvent):void
This method handle mouse down event.
Parameters
e:MouseEvent — the mouse event to be handled.
|
handleMouseMove | () | method |
protected function handleMouseMove(e:MouseEvent):void
This method handle the mouse moved event.
Parameters
e:MouseEvent — the mouse event to be handled.
|
installListeners | () | method |
override public function installListeners():void
Install listeners on this interaction.
uninstallListeners | () | method |
override public function uninstallListeners():void
Uninstall listeners on this interaction.
updateMark | () | method |
protected function updateMark():void
Update all painted mark on network canvas.