Packagetwaver.network.interaction
Classpublic class InteractionEvent
InheritanceInteractionEvent Inheritance flash.events.Event

This class wrapps interaction event information to interaction listeners. This event contains event type, network component, related mouse event, related element data.

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

twaver.network.Network


Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined By
  
InteractionEvent(kind:String, network:Network, mouseEvent:MouseEvent, element:IElement, bubbles:Boolean = false, cancelable:Boolean = false)
Event constructor.
InteractionEvent
  
clone():Event
[override]
InteractionEvent
Public Constants
 ConstantDefined 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
Property Detail
elementproperty
public var element:IElement = null

Related element of this event.

kindproperty 
public var kind:String = null

Event type.

mouseEventproperty 
public var mouseEvent:MouseEvent = null

The combined mouse event.

networkproperty 
public var network:Network = null

The network this event occured on.

pointIndexproperty 
public var pointIndex:int = -1

The control point index if this event is occured on a control point.

resizeDirectionproperty 
public var resizeDirection:String = null

Resize direction if this event is an element resizing event.

Constructor Detail
InteractionEvent()Constructor
public function InteractionEvent(kind:String, network:Network, mouseEvent:MouseEvent, element:IElement, bubbles:Boolean = false, cancelable:Boolean = false)

Event constructor.

Parameters
kind:String — event type. The possible values are defined above. They are:
  • CLICK_ELEMENT
  • DOUBLE_CLICK_ELEMENT
  • CLICK_BACKGROUND
  • DOUBLE_CLICK_BACKGROUND
  • REMOVE_ELEMENT
  • SELECT_ALL
  • UP_SUBNETWORK
  • ENTER_SUBNETWORK
  • BUNDLE_LINK
  • EXPAND_GROUP
  • LIVE_MOVE_START
  • LIVE_MOVE_BETWEEN
  • LIVE_MOVE_END
  • LAZY_MOVE_START
  • LAZY_MOVE_BETWEEN
  • LAZY_MOVE_END
  • LIVE_RESIZE_START
  • LIVE_RESIZE_BETWEEN
  • LIVE_RESIZE_END
  • LAZY_RESIZE_START
  • LAZY_RESIZE_BETWEEN
  • LAZY_RESIZE_END
  • SELECT_START
  • SELECT_BETWEEN
  • SELECT_END
  • LIVE_MOVE_POINT_START
  • LIVE_MOVE_POINT_BETWEEN
  • LIVE_MOVE_POINT_END
 
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.
Method Detail
clone()method
override public function clone():Event

Returns
Event
Constant Detail
ADD_POINTConstant
public static const ADD_POINT:String = addPoint

Event type indicates the control point is added.

BUNDLE_LINKConstant 
public static const BUNDLE_LINK:String = bundleLink

Event type indicates link has just been bundled.

CLICK_BACKGROUNDConstant 
public static const CLICK_BACKGROUND:String = clickBackground

Event type indicates network canvas background has been clicked by mouse.

CLICK_ELEMENTConstant 
public static const CLICK_ELEMENT:String = clickElement

Event type indicates element has been clicked by mouse.

CREATE_ELEMENTConstant 
public static const CREATE_ELEMENT:String = createElement

Event type indicates element has been created by interaction.

DOUBLE_CLICK_BACKGROUNDConstant 
public static const DOUBLE_CLICK_BACKGROUND:String = doubleClickBackground

Event type indicates network canvas background has been double clicked by mouse.

DOUBLE_CLICK_ELEMENTConstant 
public static const DOUBLE_CLICK_ELEMENT:String = doubleClickElement

Event type indicates element has been double clicked by mouse.

ENTER_SUBNETWORKConstant 
public static const ENTER_SUBNETWORK:String = enterSubNetwork

Event type indicates network canvas has just drill down a subnetwork element.

EXPAND_GROUPConstant 
public static const EXPAND_GROUP:String = expandGroup

Event type indicates group element has just been expanded.

LAZY_MOVE_BETWEENConstant 
public static const LAZY_MOVE_BETWEEN:String = lazyMoveBetween

Event type indicates lazy-movement by mouse is on the go now.

LAZY_MOVE_ENDConstant 
public static const LAZY_MOVE_END:String = lazyMoveEnd

Event type indicates live-movement by mouse has ended.

LAZY_MOVE_STARTConstant 
public static const LAZY_MOVE_START:String = lazyMoveStart

Event type indicates lazy-movement by mouse has just started.

LAZY_RESIZE_BETWEENConstant 
public static const LAZY_RESIZE_BETWEEN:String = lazyResizeBetween

Event type indicates lazy-resizing by mouse is on the go now.

LAZY_RESIZE_ENDConstant 
public static const LAZY_RESIZE_END:String = lazyResizeEnd

Event type indicates lazy-resizing by mouse has just ended.

LAZY_RESIZE_STARTConstant 
public static const LAZY_RESIZE_START:String = lazyResizeStart

Event type indicates lazy-resizing by mouse has just started.

LIVE_MOVE_BETWEENConstant 
public static const LIVE_MOVE_BETWEEN:String = liveMoveBetween

Event type indicates live-movement by mouse is on the go now.

LIVE_MOVE_ENDConstant 
public static const LIVE_MOVE_END:String = liveMoveEnd

Event type indicates live-movement by mouse has just ended.

LIVE_MOVE_POINT_BETWEENConstant 
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_ENDConstant 
public static const LIVE_MOVE_POINT_END:String = liveMovePointEnd

Event type indicates the control point movement by mouse has just ended.

LIVE_MOVE_POINT_STARTConstant 
public static const LIVE_MOVE_POINT_START:String = liveMovePointStart

Event type indicates the control point movement by mouse has just started.

LIVE_MOVE_STARTConstant 
public static const LIVE_MOVE_START:String = liveMoveStart

Event type indicates live-movement by mouse has just started.

LIVE_RESIZE_BETWEENConstant 
public static const LIVE_RESIZE_BETWEEN:String = liveResizeBetween

Event type indicates live-resizing by mouse is on the go now.

LIVE_RESIZE_ENDConstant 
public static const LIVE_RESIZE_END:String = liveResizeEnd

Event type indicates live-resizing by mouse has just ended.

LIVE_RESIZE_STARTConstant 
public static const LIVE_RESIZE_START:String = liveResizeStart

Event type indicates live-resizing by mouse has just started.

REMOVE_ELEMENTConstant 
public static const REMOVE_ELEMENT:String = removeElement

Event type indicates element has been removed.

REMOVE_POINTConstant 
public static const REMOVE_POINT:String = removePoint

Event type indicates the control point is removed.

SELECT_ALLConstant 
public static const SELECT_ALL:String = selectAll

Event type indicates all elements are selected on network canvas.

SELECT_BETWEENConstant 
public static const SELECT_BETWEEN:String = selectBetween

Event type indicates the mouse selection is on the go now.

SELECT_ENDConstant 
public static const SELECT_END:String = selectEnd

Event type indicates the mouse selection has just ended.

SELECT_STARTConstant 
public static const SELECT_START:String = selectStart

Event type indicates the mouse selection has just started.

UP_SUBNETWORKConstant 
public static const UP_SUBNETWORK:String = upSubNetwork

Event type indicates network canvas just goes to upper subnetwork layer.