Packagecom.yworks.yfiles.layout.hierarchic
Classpublic class HierarchicGroupLayouter
InheritanceHierarchicGroupLayouter Inheritance HierarchicLayouter Inheritance CanonicMultiStageLayouter Inheritance YObject Inheritance Object

This class is an extended variant of the HierarchicLayouter class. It is capable of laying out nested groups of nodes as well as the group nodes themselves. The grouping information is provided through DataProvider instances, which are registered with the LayoutGraph instance. The layout is being calculated recursively. The size of the group nodes is determined by the area occupied by the children of the group node.

Here is a sample output of the algorithm.



Public Properties
 PropertyDefined By
 InheritedbendReductionThreshold : int
Specifies the limit, when bends are removed and a straight line is drawn instead.
HierarchicLayouter
 InheritedcomponentLayouter : LayoutStage
Specifies the LayoutStage responsible for laying out the connected components of the graph.
CanonicMultiStageLayouter
 InheritedcomponentLayouterEnabled : Boolean
Getter: Returns whether or not ComponentLayouter is enabled.
CanonicMultiStageLayouter
  drawer : Drawer
[override] Specifies the drawer which is responsible for the third phase of the algorithm.
HierarchicGroupLayouter
  globalSequencingActive : Boolean
Getter: Returns the current strategy for the node sequencing.
HierarchicGroupLayouter
  groupBoundsCalculator : GroupBoundsCalculator
Getter: Gets the current GroupBoundsCalculator instance.
HierarchicGroupLayouter
 InheritedgroupNodeHider : LayoutStage
Specifies the LayoutStage that is responsible for hiding away grouping information for the layout algorithm.
CanonicMultiStageLayouter
 InheritedhideGroupNodes : Boolean
Specifies whether or not to hide away group nodes before the layout begins.
CanonicMultiStageLayouter
 InheritedlabelLayouter : LayoutStage
Getter: Returns the algorithm used for placing labels.
CanonicMultiStageLayouter
 InheritedlabelLayouterEnabled : Boolean
Getter: Returns whether or not LabelLayouter is enabled.
CanonicMultiStageLayouter
  layerer : OldLayerer
[override]
HierarchicGroupLayouter
  layeringStrategy : int
[override]
HierarchicGroupLayouter
  layerSequencer : LayerSequencer
[override]
HierarchicGroupLayouter
 InheritedlayoutOrientation : int
Specifies the main layout orientation.
CanonicMultiStageLayouter
  layoutStyle : int
[override]
HierarchicGroupLayouter
 InheritedmaximalDuration : uint
Specifies a time limit for the algorithm in milliseconds
HierarchicLayouter
 InheritedmementoSupport : MementoSupport
[read-only] Gets the cookie for the memento support of the hierarchic layout algorithm.
HierarchicLayouter
 InheritedminimalEdgeDistance : Number
Specifies the minimal distance between edges that run in parallel.
HierarchicLayouter
 InheritedminimalFirstSegmentLength : Number
Specifies the minimal length of first and last edge segments for edge routing.
HierarchicLayouter
 InheritedminimalLayerDistance : Number
Specifies the minimal distance between two layers.
HierarchicLayouter
 InheritedminimalNodeDistance : Number
Specifies the minimal distance between two nodes in the same layer.
HierarchicLayouter
 InheritedoptimizePortConstraints : Boolean
Specifies whether the algorithm should try to optimize PortConstraints, that are either com.yworks.yfiles.layout.PortConstraint.ANY_SIDE or null.
HierarchicLayouter
 InheritedoptimizeSameLayerEdgeRouting : Boolean
Getter: Returns whether the algorithm tries to optimize the routing of same layer edges whose PortConstraints don't impose the routing.
HierarchicLayouter
 InheritedorientationLayouter : LayoutStage
Specifies the LayoutStage that is responsible for changing the orientation of the computed layout.
CanonicMultiStageLayouter
 InheritedorientationLayouterEnabled : Boolean
Getter: Returns whether or not the OrientationLayouter is enabled.
CanonicMultiStageLayouter
 InheritedparallelEdgeLayouter : LayoutStage
Getter: Returns the LayoutStage responsible for routing parallel edges.
CanonicMultiStageLayouter
 InheritedparallelEdgeLayouterEnabled : Boolean
Getter: Returns whether or not the ParallelEdgeLayouter is enabled.
CanonicMultiStageLayouter
 InheritedremoveFalseCrossings : Boolean
Specifies whether or not false crossings should be removed from the layout.
HierarchicLayouter
 InheritedroutingStyle : int
Getter: Returns the routing style being used.
HierarchicLayouter
 InheritedselfLoopLayouter : LayoutStage
Getter: Returns the LayoutStage used for routing Self-loops.
CanonicMultiStageLayouter
 InheritedselfLoopLayouterEnabled : Boolean
Getter: Returns whether or not the SelfLoopLayouter is enabled.
CanonicMultiStageLayouter
  strongPortsScalingActive : Boolean
Specifies the property strongPortsScalingActive.
HierarchicGroupLayouter
 InheritedsubgraphLayouter : LayoutStage
Specifies the LayoutStage that is responsible for constraining the layout process to a subgraph of the target graph.
CanonicMultiStageLayouter
 InheritedsubgraphLayouterEnabled : Boolean
Getter: Returns whether or not the SubgraphLayouter is enabled.
CanonicMultiStageLayouter
Protected Properties
 PropertyDefined By
  grouping : GraphGrouping
[read-only] Returns the associated Grouping instance.
HierarchicGroupLayouter
Public Methods
 MethodDefined By
  
HierarchicGroupLayouter(init:Boolean = true)
Creates a new instance of HierarchicGroupLayouter
HierarchicGroupLayouter
 Inherited
Appends a stage to the layout pipeline.
CanonicMultiStageLayouter
 Inherited
Returns a layout for the given layout graph.
CanonicMultiStageLayouter
 Inherited
Returns a layout for the given graph interface and layout.
CanonicMultiStageLayouter
 Inherited
canLayout(graph:LayoutGraph):Boolean
Tests whether or not the given graph can be laid out by this layouter.
CanonicMultiStageLayouter
  
canLayoutCore(graph:LayoutGraph):Boolean
[override] Returns true..
HierarchicGroupLayouter
 Inherited
Disposes the memento support if it is existent, i.e.
HierarchicLayouter
  
doLayout(graph:LayoutGraph):void
[override]
HierarchicGroupLayouter
 Inherited
Calculates a layout for the given graph interface and layout.
CanonicMultiStageLayouter
  
[override] Layouts the given graph.
HierarchicGroupLayouter
 Inherited
Disables all layout stages and performs only the core layouter.
CanonicMultiStageLayouter
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
HierarchicGroupLayouter
 Inherited
hashCode():int
YObject
  
[static] Creates a new instance of HierarchicGroupLayouter
HierarchicGroupLayouter
 Inherited
[static] Instantiates a new HierarchicLayouter.
HierarchicLayouter
 Inherited
Prepends a stage to the layout pipeline.
CanonicMultiStageLayouter
 Inherited
Removes a LayoutStage that has been previously added by the methods appendStage() or prependStage().
CanonicMultiStageLayouter
Protected Methods
 MethodDefined By
 Inherited
checkGroupNodeSize(layout:GraphLayout, node:Object):void
This method throws an com.yworks.bridge.util.IllegalArgumentException if the width/height of the given group node object is zero.
CanonicMultiStageLayouter
 Inherited
checkNodeSize(layout:GraphLayout, node:Object):void
This method throws an com.yworks.bridge.util.IllegalArgumentException if the width/height of the given node object is zero.
CanonicMultiStageLayouter
  
getLayerSequence(g:LayoutGraph, LAYER_KEY:NodeMap, maxLayer:int):Vector.<Object>
[override]
HierarchicGroupLayouter
 Inherited
CanonicMultiStageLayouter
  
Initializes this object.
HierarchicGroupLayouter
 Inherited
Initializes this object.
HierarchicLayouter
  
layoutLevel(root:Node, levelNodes:NodeList, buildGraphsOnly:Boolean):Rectangle2D
Layouts the children of root recursively.
HierarchicGroupLayouter
Public Constants
 ConstantDefined By
 InheritedLAYERING_BFS : int = 4
[static] Layering strategy specifier.
HierarchicLayouter
 InheritedLAYERING_FROM_SKETCH : int = 5
[static] Layering strategy specifier.
HierarchicLayouter
 InheritedLAYERING_HIERARCHICAL_DOWNSHIFT : int = 3
[static] Layering strategy specifier.
HierarchicLayouter
 InheritedLAYERING_HIERARCHICAL_OPTIMAL : int = 1
[static] Layering strategy specifier.
HierarchicLayouter
 InheritedLAYERING_HIERARCHICAL_TIGHT_TREE : int = 2
[static] Layering strategy specifier.
HierarchicLayouter
 InheritedLAYERING_HIERARCHICAL_TOPMOST : int = 0
[static] Layering strategy specifier.
HierarchicLayouter
 InheritedLAYERING_STRATEGY_UNKNOWN : int = -1
[static] Dummy layering strategy specifier.
HierarchicLayouter
 InheritedLAYERING_USER_DEFINED : int = 6
[static] Layering strategy specifier.
HierarchicLayouter
 InheritedLINEAR_SEGMENTS : int = 1
[static] Layout style specifier.
HierarchicLayouter
 InheritedMEDIAN_SIMPLEX : int = 5
[static] Layout style specifier.
HierarchicLayouter
 InheritedPENDULUM : int = 0
[static] Layout style specifier.
HierarchicLayouter
 InheritedPOLYLINE : int = 2
[static] Layout style specifier.
HierarchicLayouter
 InheritedROUTE_ORTHOGONAL : int = 1
[static] Edge routing style specifier.
HierarchicLayouter
 InheritedROUTE_POLYLINE : int = 0
[static] Edge routing style specifier.
HierarchicLayouter
 InheritedSIMPLEX : int = 4
[static] Layout style specifier.
HierarchicLayouter
 InheritedTREE : int = 3
[static] Layout style specifier.
HierarchicLayouter
Property Detail
drawerproperty
drawer:Drawer[override]

Specifies the drawer which is responsible for the third phase of the algorithm. A drawer is responsible for the layout style of this layouter.


Implementation
    public function get drawer():Drawer
    public function set drawer(value:Drawer):void
globalSequencingActiveproperty 
globalSequencingActive:Boolean

Getter: Returns the current strategy for the node sequencing.

Setter: Determines whether a global sequencing heuristic should be used.


Implementation
    public function get globalSequencingActive():Boolean
    public function set globalSequencingActive(value:Boolean):void
groupBoundsCalculatorproperty 
groupBoundsCalculator:GroupBoundsCalculator

Getter: Gets the current GroupBoundsCalculator instance.

Setter: Sets the GroupBoundsCalculator instance. By specifying an instance of the GroupBoundsCalculator interface one can control the sizes of the group nodes. For every group of nodes which is in it's open state the instance will be asked to calculate the bounds for the given child nodes. The resulting size will be used during the ongoing layout.


Implementation
    public function get groupBoundsCalculator():GroupBoundsCalculator
    public function set groupBoundsCalculator(value:GroupBoundsCalculator):void
groupingproperty 
grouping:GraphGrouping  [read-only]

Returns the associated Grouping instance.


Implementation
    protected function get grouping():GraphGrouping
layererproperty 
layerer:OldLayerer[override]


Implementation
    public function get layerer():OldLayerer
    public function set layerer(value:OldLayerer):void
layeringStrategyproperty 
layeringStrategy:int[override]


Implementation
    public function get layeringStrategy():int
    public function set layeringStrategy(value:int):void
layerSequencerproperty 
layerSequencer:LayerSequencer[override]


Implementation
    public function get layerSequencer():LayerSequencer
    public function set layerSequencer(value:LayerSequencer):void
layoutStyleproperty 
layoutStyle:int[override]


Implementation
    public function get layoutStyle():int
    public function set layoutStyle(value:int):void
strongPortsScalingActiveproperty 
strongPortsScalingActive:Boolean

Specifies the property strongPortsScalingActive. This property determines whether strong port constraints at group nodes should be interpreted as coordinates, that should be scaled to the same amount as the sizes of the group nodes vary. The default value is true.


Implementation
    public function get strongPortsScalingActive():Boolean
    public function set strongPortsScalingActive(value:Boolean):void
Constructor Detail
HierarchicGroupLayouter()Constructor
public function HierarchicGroupLayouter(init:Boolean = true)

Creates a new instance of HierarchicGroupLayouter

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.
Method Detail
canLayoutCore()method
override public function canLayoutCore(graph:LayoutGraph):Boolean

Returns true..

Parameters

graph:LayoutGraph

Returns
Boolean
doLayout()method 
override public function doLayout(graph:LayoutGraph):void

Parameters

graph:LayoutGraph

doLayoutCore()method 
override public function doLayoutCore(g:LayoutGraph):void

Layouts the given graph.

Parameters

g:LayoutGraph

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

Returns
Class
getLayerSequence()method 
override protected function getLayerSequence(g:LayoutGraph, LAYER_KEY:NodeMap, maxLayer:int):Vector.<Object>

Parameters

g:LayoutGraph
 
LAYER_KEY:NodeMap
 
maxLayer:int

Returns
Vector.<Object>
initHierarchicGroupLayouter()method 
protected final function initHierarchicGroupLayouter():void

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

See also

layoutLevel()method 
protected function layoutLevel(root:Node, levelNodes:NodeList, buildGraphsOnly:Boolean):Rectangle2D

Layouts the children of root recursively.

Parameters

root:Node — The current root node (parent, invisible during layout)
 
levelNodes:NodeList — The nodes to be laid out
 
buildGraphsOnly:Boolean

Returns
Rectangle2D — the bounding box of the layout
newHierarchicGroupLayouter()method 
public static function newHierarchicGroupLayouter():HierarchicGroupLayouter

Creates a new instance of HierarchicGroupLayouter

Returns
HierarchicGroupLayouter