Packagecom.yworks.graph.model
Classpublic class DefaultZOrderSupport
InheritanceDefaultZOrderSupport Inheritance flash.events.EventDispatcher
Implements IZOrderSupport

This basic implementation supports z-orders for nodes, edges and labels and ports.



Public Methods
 MethodDefined By
  
Creates a new instance for the passed graph.
DefaultZOrderSupport
  
The z-order of a model item determines its render order in comparison to other model items.
DefaultZOrderSupport
  
setZOrder(item:IModelItem, order:int):void
DefaultZOrderSupport
Protected Methods
 MethodDefined By
  
onZOrderChanged(item:IModelItem, oldZOrder:int, newZOrder:int):void
This method is called by setZOrder if the z-order of a model items has changed.
DefaultZOrderSupport
Constructor Detail
DefaultZOrderSupport()Constructor
public function DefaultZOrderSupport(graph:IGraph)

Creates a new instance for the passed graph.

Parameters
graph:IGraph — The graph to use for undo support.
Method Detail
getZOrder()method
public function getZOrder(item:IModelItem):int

The z-order of a model item determines its render order in comparison to other model items. Items having a smaller z-order are drawn behind those with higher z-orders. The rendering order of items having an equal z-order is undetermined.

Parameters

item:IModelItem

Returns
int
onZOrderChanged()method 
protected function onZOrderChanged(item:IModelItem, oldZOrder:int, newZOrder:int):void

This method is called by setZOrder if the z-order of a model items has changed. It fires an event of type ZOrderEvent.Z_ORDER_CHANGED.

Parameters

item:IModelItem — The item whose z-order has changed.
 
oldZOrder:int — The z-order prior to the change.
 
newZOrder:int — The new z-order after the change.

See also

setZOrder()method 
public function setZOrder(item:IModelItem, order:int):void

Parameters

item:IModelItem
 
order:int