Packagecom.yworks.graph.model
Classpublic class NodeHierarchyEvent
InheritanceNodeHierarchyEvent Inheritance flash.events.Event

The event argument class used by INodeHierarchys to notify listeners of changes to the hierarchy.



Public Properties
 PropertyDefined By
  item : INode
[read-only] Yields the item that is the subject of this event.
NodeHierarchyEvent
  newParent : INode
[read-only] Yields the new parent of the item, if applicable.
NodeHierarchyEvent
  oldParent : INode
[read-only] Yields the old parent of the item, if applicable.
NodeHierarchyEvent
Public Methods
 MethodDefined By
  
NodeHierarchyEvent(item:INode, oldParent:INode, newParent:INode, type:String, bubbles:Boolean = false, cancelable:Boolean = false)
Creates a new instance of the event using the provided parameters.
NodeHierarchyEvent
  
clone():Event
[override]
NodeHierarchyEvent
  
[static] Factory method that creates an event for itemAdded notifications.
NodeHierarchyEvent
  
[static] Factory method that creates an event for itemChanged notifications.
NodeHierarchyEvent
  
createItemMoved(item:INode, oldParent:INode, newParent:INode):NodeHierarchyEvent
[static] Factory method that creates an event for itemMoved notifications.
NodeHierarchyEvent
  
[static] Factory method that creates an event for itemRemoved notifications.
NodeHierarchyEvent
Public Constants
 ConstantDefined By
  ITEM_ADDED : String = itemAdded
[static] Event that will be triggered if an item has been added to a hierarchy model.
NodeHierarchyEvent
  ITEM_CHANGED : String = itemChanged
[static] Event that will be triggered if an item has changed somehow in a hierarchy model.
NodeHierarchyEvent
  ITEM_MOVED : String = itemMoved
[static] Event that will be triggered if an item has been reparented in a hierarchy model.
NodeHierarchyEvent
  ITEM_REMOVED : String = itemRemoved
[static] Event that will be triggered if an item has been removed from a hierarchy model.
NodeHierarchyEvent
Property Detail
itemproperty
item:INode  [read-only]

Yields the item that is the subject of this event.


Implementation
    public function get item():INode
newParentproperty 
newParent:INode  [read-only]

Yields the new parent of the item, if applicable.


Implementation
    public function get newParent():INode
oldParentproperty 
oldParent:INode  [read-only]

Yields the old parent of the item, if applicable.


Implementation
    public function get oldParent():INode
Constructor Detail
NodeHierarchyEvent()Constructor
public function NodeHierarchyEvent(item:INode, oldParent:INode, newParent:INode, type:String, bubbles:Boolean = false, cancelable:Boolean = false)

Creates a new instance of the event using the provided parameters.

Parameters
item:INode
 
oldParent:INode
 
newParent:INode
 
type:String
 
bubbles:Boolean (default = false)
 
cancelable:Boolean (default = false)

See also

createItemAdded()
createItemRemoved()
createItemChanged()
createItemMoved()
Method Detail
clone()method
override public function clone():Event

Returns
Event
createItemAdded()method 
public static function createItemAdded(item:INode, newParent:INode):NodeHierarchyEvent

Factory method that creates an event for itemAdded notifications.

Parameters

item:INode — The item that has been added.
 
newParent:INode — The new parent.

Returns
NodeHierarchyEvent — A new NodeHierarchyEvent.
createItemChanged()method 
public static function createItemChanged(item:INode, parent:INode):NodeHierarchyEvent

Factory method that creates an event for itemChanged notifications.

Parameters

item:INode — The item that has been changed.
 
parent:INode — The current parent.

Returns
NodeHierarchyEvent — A new NodeHierarchyEvent.
createItemMoved()method 
public static function createItemMoved(item:INode, oldParent:INode, newParent:INode):NodeHierarchyEvent

Factory method that creates an event for itemMoved notifications.

Parameters

item:INode — The item that has been reparented.
 
oldParent:INode — The old parent.
 
newParent:INode — The new parent.

Returns
NodeHierarchyEvent — A new NodeHierarchyEvent.
createItemRemoved()method 
public static function createItemRemoved(item:INode, oldParent:INode):NodeHierarchyEvent

Factory method that creates an event for itemRemoved notifications.

Parameters

item:INode — The item that has been removed.
 
oldParent:INode — The last valid parent.

Returns
NodeHierarchyEvent — A new NodeHierarchyEvent.
Constant Detail
ITEM_ADDEDConstant
public static const ITEM_ADDED:String = itemAdded

Event that will be triggered if an item has been added to a hierarchy model.

ITEM_CHANGEDConstant 
public static const ITEM_CHANGED:String = itemChanged

Event that will be triggered if an item has changed somehow in a hierarchy model.

ITEM_MOVEDConstant 
public static const ITEM_MOVED:String = itemMoved

Event that will be triggered if an item has been reparented in a hierarchy model.

ITEM_REMOVEDConstant 
public static const ITEM_REMOVED:String = itemRemoved

Event that will be triggered if an item has been removed from a hierarchy model.