Packagecom.yworks.yfiles.layout.hierarchic.incremental
Classpublic class ConstraintIncrementalLayerer
InheritanceConstraintIncrementalLayerer Inheritance YObject Inheritance Object
Implements Layerer

Layerer implementation that observes relative and absolute layering constraints defined by the layering constraint factory com.yworks.yfiles.layout.hierarchic.incremental.LayerConstraintFactory. For a given graph instance, this factory can be created with method com.yworks.yfiles.layout.hierarchic.IncrementalHierarchicLayouter.createLayerConstraintFactory(). The Layerer can be used for both common layering and layering of incremental nodes.

Note: This layerer is always used automatically if the graph instance has constraints created with the layering constraint factory.

See also

com.yworks.yfiles.layout.hierarchic.incremental.LayerConstraintFactory
com.yworks.yfiles.layout.hierarchic.IncrementalHierarchicLayouter
com.yworks.yfiles.layout.hierarchic.IncrementalHierarchicLayouter.createLayerConstraintFactory()


Public Properties
 PropertyDefined By
  allowSameLayerEdges : Boolean
Specifies whether same layer edges can be created by this layerer instance.
ConstraintIncrementalLayerer
Public Methods
 MethodDefined By
  
ConstraintIncrementalLayerer(coreLayerer:Layerer, init:Boolean = true)
ConstraintIncrementalLayerer
  
Calculates a layering for the given graph.
ConstraintIncrementalLayerer
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
ConstraintIncrementalLayerer
 Inherited
hashCode():int
YObject
  
[static]
ConstraintIncrementalLayerer
Protected Methods
 MethodDefined By
  
Checks if the current set of strong constraints is consistent (i.e.
ConstraintIncrementalLayerer
  
Initializes this object.
ConstraintIncrementalLayerer
Public Constants
 ConstantDefined By
  EDGE_WEIGHTS_DPKEY : String = y.layout.hierarchic.incremental.ConstraintIncrementalLayerer.EDGE_WEIGHTS_DPKEY
[static] DataProvider key for additional edge weights of type int.
ConstraintIncrementalLayerer
Property Detail
allowSameLayerEdgesproperty
allowSameLayerEdges:Boolean

Specifies whether same layer edges can be created by this layerer instance.

This only concerns edges between nodes that have no hard constraints that will force a same layer edge (i.e. a same layer constraint).

Default value is false.


Implementation
    public function get allowSameLayerEdges():Boolean
    public function set allowSameLayerEdges(value:Boolean):void
Constructor Detail
ConstraintIncrementalLayerer()Constructor
public function ConstraintIncrementalLayerer(coreLayerer:Layerer, init:Boolean = true)

Parameters
coreLayerer: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.
Method Detail
assignLayers()method
public function assignLayers(g:LayoutGraph, layers:Layers, ldp:LayoutDataProvider):void

Calculates a layering for the given graph.

Parameters

g:LayoutGraph — the graph containing all nodes and edges.
 
layers:Layers — a structure that is filled by the layerer. If the layerer is used for layering incremental nodes, the layers structure already have to contain all non-incremental nodes.
 
ldp:LayoutDataProvider

checkConstraints()method 
protected function checkConstraints():void

Checks if the current set of strong constraints is consistent (i.e. has no cycles)


Throws
IllegalArgumentException — if the constraint network is inconsistent
getClass()method 
override public function getClass():Class

Returns
Class
initConstraintIncrementalLayerer()method 
protected final function initConstraintIncrementalLayerer(coreLayerer:Layerer):void

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

Parameters

coreLayerer:Layerer

See also

newConstraintIncrementalLayerer()method 
public static function newConstraintIncrementalLayerer(coreLayerer:Layerer):ConstraintIncrementalLayerer

Parameters

coreLayerer:Layerer

Returns
ConstraintIncrementalLayerer
Constant Detail
EDGE_WEIGHTS_DPKEYConstant
public static const EDGE_WEIGHTS_DPKEY:String = y.layout.hierarchic.incremental.ConstraintIncrementalLayerer.EDGE_WEIGHTS_DPKEY

DataProvider key for additional edge weights of type int.

The Layerer tries to keep edges with higher weights short.