Packagecom.yworks.yfiles.layout.hierarchic.incremental
Classpublic class DefaultLayeredComponentsMerger
InheritanceDefaultLayeredComponentsMerger Inheritance YObject Inheritance Object
Implements LayeredComponentsMerger

A default implementation of a com.yworks.yfiles.layout.hierarchic.incremental.LayeredComponentsMerger that provides simple default behaviors. Instances of this class are used internally by com.yworks.yfiles.layout.hierarchic.incremental.HierarchicLayouterImpl and com.yworks.yfiles.layout.hierarchic.incremental.MultiComponentLayerer e.g.

See also

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


Public Properties
 PropertyDefined By
  policy : int
Getter: Returns the current policy constant.
DefaultLayeredComponentsMerger
Public Methods
 MethodDefined By
  
DefaultLayeredComponentsMerger(init:Boolean = true)
Creates a new instance of DefaultLayeredComponentsMerger with default policy ( POLICY_ADD_RIGHT_TOP_ALIGNED)
DefaultLayeredComponentsMerger
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
DefaultLayeredComponentsMerger
 Inherited
hashCode():int
YObject
  
merge(graph:LayoutGraph, ldp:LayoutDataProvider, srcLayers:Layers, targetLayers:Layers):void
DefaultLayeredComponentsMerger
  
[static] Creates a new instance of DefaultLayeredComponentsMerger with default policy ( POLICY_ADD_RIGHT_TOP_ALIGNED)
DefaultLayeredComponentsMerger
  
[static] Creates a new instance of DefaultLayeredComponentsMerger using the given policy constant.
DefaultLayeredComponentsMerger
Protected Methods
 MethodDefined By
  
Initializes this object.
DefaultLayeredComponentsMerger
  
Initializes this object.
DefaultLayeredComponentsMerger
Public Constants
 ConstantDefined By
  POLICY_ADD_ABOVE : int = 1
[static] Constant for merging policy.
DefaultLayeredComponentsMerger
  POLICY_ADD_BELOW : int = 0
[static] Constant for merging policy.
DefaultLayeredComponentsMerger
  POLICY_ADD_LEFT_BOTTOM_ALIGNED : int = 35
[static] Constant for merging policy.
DefaultLayeredComponentsMerger
  POLICY_ADD_LEFT_CENTER_ALIGNED : int = 67
[static] Constant for merging policy.
DefaultLayeredComponentsMerger
  POLICY_ADD_LEFT_TOP_ALIGNED : int = 19
[static] Constant for merging policy.
DefaultLayeredComponentsMerger
  POLICY_ADD_RIGHT_BOTTOM_ALIGNED : int = 34
[static] Constant for merging policy.
DefaultLayeredComponentsMerger
  POLICY_ADD_RIGHT_CENTER_ALIGNED : int = 66
[static] Constant for merging policy.
DefaultLayeredComponentsMerger
  POLICY_ADD_RIGHT_TOP_ALIGNED : int = 18
[static] Constant for merging policy.
DefaultLayeredComponentsMerger
Property Detail
policyproperty
policy:int

Getter: Returns the current policy constant.

Setter: Sets the policy constant as defined in com.yworks.yfiles.layout.hierarchic.incremental.DefaultLayeredComponentsMerger.


Implementation
    public function get policy():int
    public function set policy(value:int):void

See also

Constructor Detail
DefaultLayeredComponentsMerger()Constructor
public function DefaultLayeredComponentsMerger(init:Boolean = true)

Creates a new instance of DefaultLayeredComponentsMerger with default policy ( POLICY_ADD_RIGHT_TOP_ALIGNED)

Parameters
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
getClass()method
override public function getClass():Class

Returns
Class
initDefaultLayeredComponentsMerger1()method 
protected final function initDefaultLayeredComponentsMerger1():void

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

See also

initDefaultLayeredComponentsMerger2()method 
protected final function initDefaultLayeredComponentsMerger2(policy:int):void

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

Parameters

policy:int

See also

merge()method 
public function merge(graph:LayoutGraph, ldp:LayoutDataProvider, srcLayers:Layers, targetLayers:Layers):void

Parameters

graph:LayoutGraph
 
ldp:LayoutDataProvider
 
srcLayers:Layers
 
targetLayers:Layers

newDefaultLayeredComponentsMerger1()method 
public static function newDefaultLayeredComponentsMerger1():DefaultLayeredComponentsMerger

Creates a new instance of DefaultLayeredComponentsMerger with default policy ( POLICY_ADD_RIGHT_TOP_ALIGNED)

Returns
DefaultLayeredComponentsMerger

See also

newDefaultLayeredComponentsMerger2()method 
public static function newDefaultLayeredComponentsMerger2(policy:int):DefaultLayeredComponentsMerger

Creates a new instance of DefaultLayeredComponentsMerger using the given policy constant.

Parameters

policy:int

Returns
DefaultLayeredComponentsMerger
Constant Detail
POLICY_ADD_ABOVEConstant
public static const POLICY_ADD_ABOVE:int = 1

Constant for merging policy. This policy adds new layers from the source layering above the layers in the target layering.

POLICY_ADD_BELOWConstant 
public static const POLICY_ADD_BELOW:int = 0

Constant for merging policy. This policy adds new layers from the source layering below the layers in the target layering.

POLICY_ADD_LEFT_BOTTOM_ALIGNEDConstant 
public static const POLICY_ADD_LEFT_BOTTOM_ALIGNED:int = 35

Constant for merging policy. This policy adds new layers from the source layering to the left of the layers in the target layering. Both layerings will be bottom aligned before the merge.

POLICY_ADD_LEFT_CENTER_ALIGNEDConstant 
public static const POLICY_ADD_LEFT_CENTER_ALIGNED:int = 67

Constant for merging policy. This policy adds new layers from the source layering to the left of the layers in the target layering. Both layerings will be center aligned before the merge.

POLICY_ADD_LEFT_TOP_ALIGNEDConstant 
public static const POLICY_ADD_LEFT_TOP_ALIGNED:int = 19

Constant for merging policy. This policy adds new layers from the source layering to the left of the layers in the target layering. Both layerings will be top aligned before the merge.

POLICY_ADD_RIGHT_BOTTOM_ALIGNEDConstant 
public static const POLICY_ADD_RIGHT_BOTTOM_ALIGNED:int = 34

Constant for merging policy. This policy adds new layers from the source layering to the right of the layers in the target layering. Both layerings will be bottom aligned before the merge.

POLICY_ADD_RIGHT_CENTER_ALIGNEDConstant 
public static const POLICY_ADD_RIGHT_CENTER_ALIGNED:int = 66

Constant for merging policy. This policy adds new layers from the source layering to the right of the layers in the target layering. Both layerings will be center aligned before the merge.

POLICY_ADD_RIGHT_TOP_ALIGNEDConstant 
public static const POLICY_ADD_RIGHT_TOP_ALIGNED:int = 18

Constant for merging policy. This policy adds new layers from the source layering to the right of the layers in the target layering. Both layerings will be top aligned before the merge.