Package | twaver.network.interaction |
Class | public class InteractionEvent |
Inheritance | InteractionEvent ![]() |
In this example, we monitering all interaction event and print the event information in a text area component:
network.addInteractionListener(function(e:InteractionEvent):void{ textArea.text += e.kind + "\n"; });
See also
Property | Defined By | ||
---|---|---|---|
element : IElement = null
Related element of this event. | InteractionEvent | ||
kind : String = null
Event type. | InteractionEvent | ||
mouseEvent : MouseEvent = null
The combined mouse event. | InteractionEvent | ||
network : Network = null
The network this event occured on. | InteractionEvent | ||
pointIndex : int = -1
The control point index if this event is occured on a control point. | InteractionEvent | ||
resizeDirection : String = null
Resize direction if this event is an element resizing event. | InteractionEvent |
Method | Defined By | ||
---|---|---|---|
InteractionEvent(kind:String, network:Network, mouseEvent:MouseEvent, element:IElement, bubbles:Boolean = false, cancelable:Boolean = false)
Event constructor. | InteractionEvent | ||
clone():Event [override]
| InteractionEvent |
Constant | Defined By | ||
---|---|---|---|
ADD_POINT : String = addPoint [static]
Event type indicates the control point is added. | InteractionEvent | ||
BUNDLE_LINK : String = bundleLink [static]
Event type indicates link has just been bundled. | InteractionEvent | ||
CLICK_BACKGROUND : String = clickBackground [static]
Event type indicates network canvas background has been clicked by mouse. | InteractionEvent | ||
CLICK_ELEMENT : String = clickElement [static]
Event type indicates element has been clicked by mouse. | InteractionEvent | ||
CREATE_ELEMENT : String = createElement [static]
Event type indicates element has been created by interaction. | InteractionEvent | ||
DOUBLE_CLICK_BACKGROUND : String = doubleClickBackground [static]
Event type indicates network canvas background has been double clicked by mouse. | InteractionEvent | ||
DOUBLE_CLICK_ELEMENT : String = doubleClickElement [static]
Event type indicates element has been double clicked by mouse. | InteractionEvent | ||
ENTER_SUBNETWORK : String = enterSubNetwork [static]
Event type indicates network canvas has just drill down a subnetwork element. | InteractionEvent | ||
EXPAND_GROUP : String = expandGroup [static]
Event type indicates group element has just been expanded. | InteractionEvent | ||
LAZY_MOVE_BETWEEN : String = lazyMoveBetween [static]
Event type indicates lazy-movement by mouse is on the go now. | InteractionEvent | ||
LAZY_MOVE_END : String = lazyMoveEnd [static]
Event type indicates live-movement by mouse has ended. | InteractionEvent | ||
LAZY_MOVE_START : String = lazyMoveStart [static]
Event type indicates lazy-movement by mouse has just started. | InteractionEvent | ||
LAZY_RESIZE_BETWEEN : String = lazyResizeBetween [static]
Event type indicates lazy-resizing by mouse is on the go now. | InteractionEvent | ||
LAZY_RESIZE_END : String = lazyResizeEnd [static]
Event type indicates lazy-resizing by mouse has just ended. | InteractionEvent | ||
LAZY_RESIZE_START : String = lazyResizeStart [static]
Event type indicates lazy-resizing by mouse has just started. | InteractionEvent | ||
LIVE_MOVE_BETWEEN : String = liveMoveBetween [static]
Event type indicates live-movement by mouse is on the go now. | InteractionEvent | ||
LIVE_MOVE_END : String = liveMoveEnd [static]
Event type indicates live-movement by mouse has just ended. | InteractionEvent | ||
LIVE_MOVE_POINT_BETWEEN : String = liveMovePointBetween [static]
Event type indicates the control point movement by mouse is on the go. | InteractionEvent | ||
LIVE_MOVE_POINT_END : String = liveMovePointEnd [static]
Event type indicates the control point movement by mouse has just ended. | InteractionEvent | ||
LIVE_MOVE_POINT_START : String = liveMovePointStart [static]
Event type indicates the control point movement by mouse has just started. | InteractionEvent | ||
LIVE_MOVE_START : String = liveMoveStart [static]
Event type indicates live-movement by mouse has just started. | InteractionEvent | ||
LIVE_RESIZE_BETWEEN : String = liveResizeBetween [static]
Event type indicates live-resizing by mouse is on the go now. | InteractionEvent | ||
LIVE_RESIZE_END : String = liveResizeEnd [static]
Event type indicates live-resizing by mouse has just ended. | InteractionEvent | ||
LIVE_RESIZE_START : String = liveResizeStart [static]
Event type indicates live-resizing by mouse has just started. | InteractionEvent | ||
REMOVE_ELEMENT : String = removeElement [static]
Event type indicates element has been removed. | InteractionEvent | ||
REMOVE_POINT : String = removePoint [static]
Event type indicates the control point is removed. | InteractionEvent | ||
SELECT_ALL : String = selectAll [static]
Event type indicates all elements are selected on network canvas. | InteractionEvent | ||
SELECT_BETWEEN : String = selectBetween [static]
Event type indicates the mouse selection is on the go now. | InteractionEvent | ||
SELECT_END : String = selectEnd [static]
Event type indicates the mouse selection has just ended. | InteractionEvent | ||
SELECT_START : String = selectStart [static]
Event type indicates the mouse selection has just started. | InteractionEvent | ||
UP_SUBNETWORK : String = upSubNetwork [static]
Event type indicates network canvas just goes to upper subnetwork layer. | InteractionEvent |
element | property |
public var element:IElement = null
Related element of this event.
kind | property |
public var kind:String = null
Event type.
mouseEvent | property |
public var mouseEvent:MouseEvent = null
The combined mouse event.
network | property |
public var network:Network = null
The network this event occured on.
pointIndex | property |
public var pointIndex:int = -1
The control point index if this event is occured on a control point.
resizeDirection | property |
public var resizeDirection:String = null
Resize direction if this event is an element resizing event.
InteractionEvent | () | Constructor |
public function InteractionEvent(kind:String, network:Network, mouseEvent:MouseEvent, element:IElement, bubbles:Boolean = false, cancelable:Boolean = false)
Event constructor.
Parameterskind:String — event type. The possible values are defined above. They are:
| |
network:Network — the network this event occured.
| |
mouseEvent:MouseEvent — the combined mouse event.
| |
element:IElement — the related element.
| |
bubbles:Boolean (default = false ) — whether bubble this event up.
| |
cancelable:Boolean (default = false ) — whether this event can be canceled.
|
clone | () | method |
override public function clone():Event
Returns
Event |
ADD_POINT | Constant |
public static const ADD_POINT:String = addPoint
Event type indicates the control point is added.
BUNDLE_LINK | Constant |
public static const BUNDLE_LINK:String = bundleLink
Event type indicates link has just been bundled.
CLICK_BACKGROUND | Constant |
public static const CLICK_BACKGROUND:String = clickBackground
Event type indicates network canvas background has been clicked by mouse.
CLICK_ELEMENT | Constant |
public static const CLICK_ELEMENT:String = clickElement
Event type indicates element has been clicked by mouse.
CREATE_ELEMENT | Constant |
public static const CREATE_ELEMENT:String = createElement
Event type indicates element has been created by interaction.
DOUBLE_CLICK_BACKGROUND | Constant |
public static const DOUBLE_CLICK_BACKGROUND:String = doubleClickBackground
Event type indicates network canvas background has been double clicked by mouse.
DOUBLE_CLICK_ELEMENT | Constant |
public static const DOUBLE_CLICK_ELEMENT:String = doubleClickElement
Event type indicates element has been double clicked by mouse.
ENTER_SUBNETWORK | Constant |
public static const ENTER_SUBNETWORK:String = enterSubNetwork
Event type indicates network canvas has just drill down a subnetwork element.
EXPAND_GROUP | Constant |
public static const EXPAND_GROUP:String = expandGroup
Event type indicates group element has just been expanded.
LAZY_MOVE_BETWEEN | Constant |
public static const LAZY_MOVE_BETWEEN:String = lazyMoveBetween
Event type indicates lazy-movement by mouse is on the go now.
LAZY_MOVE_END | Constant |
public static const LAZY_MOVE_END:String = lazyMoveEnd
Event type indicates live-movement by mouse has ended.
LAZY_MOVE_START | Constant |
public static const LAZY_MOVE_START:String = lazyMoveStart
Event type indicates lazy-movement by mouse has just started.
LAZY_RESIZE_BETWEEN | Constant |
public static const LAZY_RESIZE_BETWEEN:String = lazyResizeBetween
Event type indicates lazy-resizing by mouse is on the go now.
LAZY_RESIZE_END | Constant |
public static const LAZY_RESIZE_END:String = lazyResizeEnd
Event type indicates lazy-resizing by mouse has just ended.
LAZY_RESIZE_START | Constant |
public static const LAZY_RESIZE_START:String = lazyResizeStart
Event type indicates lazy-resizing by mouse has just started.
LIVE_MOVE_BETWEEN | Constant |
public static const LIVE_MOVE_BETWEEN:String = liveMoveBetween
Event type indicates live-movement by mouse is on the go now.
LIVE_MOVE_END | Constant |
public static const LIVE_MOVE_END:String = liveMoveEnd
Event type indicates live-movement by mouse has just ended.
LIVE_MOVE_POINT_BETWEEN | Constant |
public static const LIVE_MOVE_POINT_BETWEEN:String = liveMovePointBetween
Event type indicates the control point movement by mouse is on the go.
LIVE_MOVE_POINT_END | Constant |
public static const LIVE_MOVE_POINT_END:String = liveMovePointEnd
Event type indicates the control point movement by mouse has just ended.
LIVE_MOVE_POINT_START | Constant |
public static const LIVE_MOVE_POINT_START:String = liveMovePointStart
Event type indicates the control point movement by mouse has just started.
LIVE_MOVE_START | Constant |
public static const LIVE_MOVE_START:String = liveMoveStart
Event type indicates live-movement by mouse has just started.
LIVE_RESIZE_BETWEEN | Constant |
public static const LIVE_RESIZE_BETWEEN:String = liveResizeBetween
Event type indicates live-resizing by mouse is on the go now.
LIVE_RESIZE_END | Constant |
public static const LIVE_RESIZE_END:String = liveResizeEnd
Event type indicates live-resizing by mouse has just ended.
LIVE_RESIZE_START | Constant |
public static const LIVE_RESIZE_START:String = liveResizeStart
Event type indicates live-resizing by mouse has just started.
REMOVE_ELEMENT | Constant |
public static const REMOVE_ELEMENT:String = removeElement
Event type indicates element has been removed.
REMOVE_POINT | Constant |
public static const REMOVE_POINT:String = removePoint
Event type indicates the control point is removed.
SELECT_ALL | Constant |
public static const SELECT_ALL:String = selectAll
Event type indicates all elements are selected on network canvas.
SELECT_BETWEEN | Constant |
public static const SELECT_BETWEEN:String = selectBetween
Event type indicates the mouse selection is on the go now.
SELECT_END | Constant |
public static const SELECT_END:String = selectEnd
Event type indicates the mouse selection has just ended.
SELECT_START | Constant |
public static const SELECT_START:String = selectStart
Event type indicates the mouse selection has just started.
UP_SUBNETWORK | Constant |
public static const UP_SUBNETWORK:String = upSubNetwork
Event type indicates network canvas just goes to upper subnetwork layer.