Packagecom.yworks.yfiles.layout.hierarchic.incremental
Classpublic class MultiComponentLayerer
InheritanceMultiComponentLayerer Inheritance YObject Inheritance Object
Implements Layerer

Wrapper Layerer implementation that delegates the actual layering to a delegate Layerer. If the graph consists of multiple components, they will be identified and sorted and each of the components will be layered separately using the delegate Layerer instance. After that they will all be merged in order using the specified com.yworks.yfiles.layout.hierarchic.incremental.LayeredComponentsMerger instance.

See also

com.yworks.yfiles.layout.hierarchic.incremental.LayeredComponentsMerger


Public Properties
 PropertyDefined By
  componentComparator : Comparator
Getter: Returns the current component Comparator or null.
MultiComponentLayerer
  merger : LayeredComponentsMerger
Getter: Returns the merger.
MultiComponentLayerer
  singleComponentLayerer : Layerer
Getter: Returns the Layerer instance that is used for delegation.
MultiComponentLayerer
Public Methods
 MethodDefined By
  
MultiComponentLayerer(singleComponentLayerer:Layerer, init:Boolean = true)
Creates a new instance of MultiComponentLayerer using the given delegate and a new instance of com.yworks.yfiles.layout.hierarchic.incremental.DefaultLayeredComponentsMerger as the merger and no component comparator.
MultiComponentLayerer
  
MultiComponentLayerer
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
MultiComponentLayerer
 Inherited
hashCode():int
YObject
  
[static] Creates a new instance of MultiComponentLayerer using the given delegate and a new instance of com.yworks.yfiles.layout.hierarchic.incremental.DefaultLayeredComponentsMerger as the merger and no component comparator.
MultiComponentLayerer
  
[static] Creates a new instance of MultiComponentLayerer using the given delegates.
MultiComponentLayerer
Protected Methods
 MethodDefined By
  
initMultiComponentLayerer1(singleComponentLayerer:Layerer):void
Initializes this object.
MultiComponentLayerer
  
initMultiComponentLayerer2(singleComponentLayerer:Layerer, merger:LayeredComponentsMerger, componentComparator:Comparator):void
Initializes this object.
MultiComponentLayerer
  
sort(nodeLists:Vector.<Object>, componentIndexProvider:DataProvider):void
Callback method that is called during assignLayers().
MultiComponentLayerer
Property Detail
componentComparatorproperty
componentComparator:Comparator

Getter: Returns the current component Comparator or null.

Setter: Sets the component Comparator instance, may be null


Implementation
    public function get componentComparator():Comparator
    public function set componentComparator(value:Comparator):void
mergerproperty 
merger:LayeredComponentsMerger

Getter: Returns the merger.

Setter: Sets the new merger instance.


Implementation
    public function get merger():LayeredComponentsMerger
    public function set merger(value:LayeredComponentsMerger):void

Throws
ReferenceError — if the argument is null
singleComponentLayererproperty 
singleComponentLayerer:Layerer

Getter: Returns the Layerer instance that is used for delegation.

Setter: Sets the new delegate Layerer instance.


Implementation
    public function get singleComponentLayerer():Layerer
    public function set singleComponentLayerer(value:Layerer):void

Throws
ReferenceError — if the argument is null
Constructor Detail
MultiComponentLayerer()Constructor
public function MultiComponentLayerer(singleComponentLayerer:Layerer, init:Boolean = true)

Creates a new instance of MultiComponentLayerer using the given delegate and a new instance of com.yworks.yfiles.layout.hierarchic.incremental.DefaultLayeredComponentsMerger as the merger and no component comparator.

Parameters
singleComponentLayerer:Layerer
 
init:Boolean (default = true) — An internally used switch to help handle proper instance initialization in inheritance chains where classes can have multiple constructor-like factory methods. This parameter can safely be ignored/omitted when calling the constructor.

See also

Method Detail
assignLayers()method
public function assignLayers(graph:LayoutGraph, layers:Layers, ldp:LayoutDataProvider):void

Parameters

graph:LayoutGraph
 
layers:Layers
 
ldp:LayoutDataProvider

getClass()method 
override public function getClass():Class

Returns
Class
initMultiComponentLayerer1()method 
protected final function initMultiComponentLayerer1(singleComponentLayerer:Layerer):void

Initializes this object. See the documentation of the corresponding factory method newMultiComponentLayerer1() for details.

Parameters

singleComponentLayerer:Layerer

See also

initMultiComponentLayerer2()method 
protected final function initMultiComponentLayerer2(singleComponentLayerer:Layerer, merger:LayeredComponentsMerger, componentComparator:Comparator):void

Initializes this object. See the documentation of the corresponding factory method newMultiComponentLayerer2() for details.

Parameters

singleComponentLayerer:Layerer
 
merger:LayeredComponentsMerger
 
componentComparator:Comparator

See also

newMultiComponentLayerer1()method 
public static function newMultiComponentLayerer1(singleComponentLayerer:Layerer):MultiComponentLayerer

Creates a new instance of MultiComponentLayerer using the given delegate and a new instance of com.yworks.yfiles.layout.hierarchic.incremental.DefaultLayeredComponentsMerger as the merger and no component comparator.

Parameters

singleComponentLayerer:Layerer

Returns
MultiComponentLayerer

See also

newMultiComponentLayerer2()method 
public static function newMultiComponentLayerer2(singleComponentLayerer:Layerer, merger:LayeredComponentsMerger, componentComparator:Comparator):MultiComponentLayerer

Creates a new instance of MultiComponentLayerer using the given delegates.

Parameters

singleComponentLayerer:Layerer
 
merger:LayeredComponentsMerger
 
componentComparator:Comparator

Returns
MultiComponentLayerer
sort()method 
protected function sort(nodeLists:Vector.<Object>, componentIndexProvider:DataProvider):void

Callback method that is called during assignLayers(). It is responsible for sorting an array consisting of com.yworks.yfiles.base.NodeList s, each containing nodes that belong to a different component. By default this method uses the ComponentComparator (componentComparator) to sort the list or does nothing if that instance is null.

Parameters

nodeLists:Vector.<Object> — the array of NodeLists each containing all nodes that belong to the same component
 
componentIndexProvider:DataProvider — a DataProvider that can be used to query the nodes' component indices via com.yworks.yfiles.base.DataProvider.getInt() and/or com.yworks.yfiles.base.DataProvider.getObject().

See also