Package | com.yworks.yfiles.layout.grouping |
Class | public class RecursiveGroupLayouter |
Inheritance | RecursiveGroupLayouter AbstractLayoutStage YObject Object |
Note that this class can be run without a core layouter instance. In this case no layout is calculated, instead the group node bounds are merely adjusted to fit their respective contents. There are two alternatives for applying different layout styles to the contents of group nodes: 1. Map each group node to the corresponding layouter using data provider key GROUP_NODE_LAYOUTER_DPKEY. The content of the hierarchy root is laid out with the core layouter. 2. Alternatively you can use a com.yworks.yfiles.layout.LayoutMultiplexer as core layouter.
See also
Property | Defined By | ||
---|---|---|---|
autoAssignPortCandidates : Boolean
Specifies whether or not temporary port candidates should be inserted for edges without such candidates. | RecursiveGroupLayouter | ||
considerEmptyGroups : Boolean
Specifies whether or not group nodes without children are handled the same way as group nodes with children. | RecursiveGroupLayouter | ||
considerSketch : Boolean
Specifies whether or not to consider the initial coordinates of the graph elements. | RecursiveGroupLayouter | ||
coreLayouter : Layouter
Specifies the core layouter. | AbstractLayoutStage | ||
groupBoundsCalculator : GroupBoundsCalculator
Getter:
Returns the currently installed GroupBoundsCalculator instance. | RecursiveGroupLayouter | ||
interEdgeRouter : Layouter
Specifies the current edge router used to layout inter-edges. | RecursiveGroupLayouter | ||
interEdgesDpKey : Object
Specifies the key that is used to mark the inter-edges to be routed. | RecursiveGroupLayouter | ||
replacePortConstraints : Boolean
Specifies whether or not port constraints should be temporarily replaced by port candidates. | RecursiveGroupLayouter |
Method | Defined By | ||
---|---|---|---|
RecursiveGroupLayouter(init:Boolean = true)
Creates a new instance of RecursiveGroupLayouter. | RecursiveGroupLayouter | ||
canLayout(graph:LayoutGraph):Boolean [override] | RecursiveGroupLayouter | ||
doLayout(graph:LayoutGraph):void [override] | RecursiveGroupLayouter | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | RecursiveGroupLayouter | ||
hashCode():int | YObject | ||
[static]
Creates a new instance of RecursiveGroupLayouter. | RecursiveGroupLayouter | ||
[static]
Creates a new instance of RecursiveGroupLayouter using the given layout algorithm. | RecursiveGroupLayouter | ||
[static]
Creates a new instance of RecursiveGroupLayouter using the given layout algorithm and GroupBoundsCalculator implementation. | RecursiveGroupLayouter |
Method | Defined By | ||
---|---|---|---|
canLayoutCore(graph:LayoutGraph):Boolean
Queries the core layouter whether or not the given graph can be laid out. | AbstractLayoutStage | ||
doLayoutCore(graph:LayoutGraph):void
Invokes the layout routine of the core layouter. | AbstractLayoutStage | ||
initAbstractLayoutStage1():void | AbstractLayoutStage | ||
initAbstractLayoutStage2(core:Layouter):void | AbstractLayoutStage | ||
initRecursiveGroupLayouter1():void
Initializes this object. | RecursiveGroupLayouter | ||
initRecursiveGroupLayouter2(core:Layouter):void
Initializes this object. | RecursiveGroupLayouter | ||
Initializes this object. | RecursiveGroupLayouter | ||
This method is called after calculating the overall layout and reroutes the inter-edges, i.e., edges which traverse the boundary of a group node. | RecursiveGroupLayouter |
Constant | Defined By | ||
---|---|---|---|
GROUP_NODE_LAYOUTER_DPKEY : Object = y.layout.grouping.RecursiveGroupLayouter.GROUP_NODE_LAYOUTER_DPKEY [static]
com.yworks.yfiles.base.DataProvider key used to retrieve a com.yworks.yfiles.layout.Layouter instance for each group node. | RecursiveGroupLayouter | ||
NULL_LAYOUTER : Layouter [static]
A constant that represents a layouter implementation that does nothing. | RecursiveGroupLayouter |
autoAssignPortCandidates | property |
autoAssignPortCandidates:Boolean
Specifies whether or not temporary port candidates should be inserted for edges without such candidates.
If we do not insert such port candidates, inter-edges (edges which traverse the boundary of a group node) always end at the border/center of the corresponding group node and, thus, are routed straight-line (see routeInterEdges()). Hence, enabling this option may produce more suitable edge routes if the layout algorithm applied to the content of a group node can handle port candidates. The default value is false
. Note: predefined port candidates are always satisfied, even if this option is disabled (only if the applied layouter supports them).
public function get autoAssignPortCandidates():Boolean
public function set autoAssignPortCandidates(value:Boolean):void
See also
considerEmptyGroups | property |
considerEmptyGroups:Boolean
Specifies whether or not group nodes without children are handled the same way as group nodes with children.
Defaults to true
.
public function get considerEmptyGroups():Boolean
public function set considerEmptyGroups(value:Boolean):void
See also
considerSketch | property |
considerSketch:Boolean
Specifies whether or not to consider the initial coordinates of the graph elements. This option should be enabled if the recursive group layouter uses a layouter that runs in "from sketch mode". If it is enabled, the recursive group layouter sets the coordinates of the node elements to their initial position before the corresponding layouter is called. By default this option is disabled.
public function get considerSketch():Boolean
public function set considerSketch(value:Boolean):void
groupBoundsCalculator | property |
groupBoundsCalculator:GroupBoundsCalculator
Getter: Returns the currently installed GroupBoundsCalculator instance.
Setter: Sets a new GroupBoundsCalculator instance that applies to all encountered group nodes. public function get groupBoundsCalculator():GroupBoundsCalculator
public function set groupBoundsCalculator(value:GroupBoundsCalculator):void
interEdgeRouter | property |
interEdgeRouter:Layouter
Specifies the current edge router used to layout inter-edges. During layout edges that connect from outside a group node to the content inside (inter-edges) are temporarily connected to the group node itself. Hence, they are routed when the original graph structure is restored using this edge router.
It is required that a suitable selection key (interEdgesDpKey) is specified. The same selection key must be used to set the sphere of action for the edge router.
By default, no edge router is specified.
public function get interEdgeRouter():Layouter
public function set interEdgeRouter(value:Layouter):void
See also
interEdgesDpKey | property |
interEdgesDpKey:Object
Specifies the key that is used to mark the inter-edges to be routed. Note that this layouter automatically marks these edges and registers the DataProvider using the specified key. The key should be used by the specified inter-edge router to obtain the edges to be routed.
By default, com.yworks.yfiles.layout.LayouterKeys.SELECTED_EDGES is used.
public function get interEdgesDpKey():Object
public function set interEdgesDpKey(value:Object):void
IllegalArgumentException — if the specified key is null .
|
See also
replacePortConstraints | property |
replacePortConstraints:Boolean
Specifies whether or not port constraints should be temporarily replaced by port candidates.
If port constraints are not replaced by port candidates, inter-edges (edges which traverse the boundary of a group node) always end at the border/center of the corresponding group node (even if those edges have port constraints) and, thus, are routed straight-line (see routeInterEdges()) without considering the constraint. Port candidates are automatically redirected to their original location. Hence, enabling this option may produce more suitable edge routes if the layout algorithm applied to the content of a group node can handle port candidates. The default value is true
.
public function get replacePortConstraints():Boolean
public function set replacePortConstraints(value:Boolean):void
See also
RecursiveGroupLayouter | () | Constructor |
public function RecursiveGroupLayouter(init:Boolean = true)
Creates a new instance of RecursiveGroupLayouter.
Parametersinit: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.
|
canLayout | () | method |
override public function canLayout(graph:LayoutGraph):Boolean
Parameters
graph:LayoutGraph |
Boolean |
doLayout | () | method |
getClass | () | method |
override public function getClass():Class
ReturnsClass |
initRecursiveGroupLayouter1 | () | method |
protected final function initRecursiveGroupLayouter1():void
Initializes this object. See the documentation of the corresponding factory method newRecursiveGroupLayouter1()
for details.
See also
initRecursiveGroupLayouter2 | () | method |
protected final function initRecursiveGroupLayouter2(core:Layouter):void
Initializes this object. See the documentation of the corresponding factory method newRecursiveGroupLayouter2()
for details.
Parameters
core:Layouter |
See also
initRecursiveGroupLayouter3 | () | method |
protected final function initRecursiveGroupLayouter3(core:Layouter, gbc:GroupBoundsCalculator):void
Initializes this object. See the documentation of the corresponding factory method newRecursiveGroupLayouter3()
for details.
Parameters
core:Layouter | |
gbc:GroupBoundsCalculator |
See also
newRecursiveGroupLayouter1 | () | method |
public static function newRecursiveGroupLayouter1():RecursiveGroupLayouter
Creates a new instance of RecursiveGroupLayouter.
ReturnsRecursiveGroupLayouter |
newRecursiveGroupLayouter2 | () | method |
public static function newRecursiveGroupLayouter2(core:Layouter):RecursiveGroupLayouter
Creates a new instance of RecursiveGroupLayouter using the given layout algorithm.
Parameters
core:Layouter |
RecursiveGroupLayouter |
newRecursiveGroupLayouter3 | () | method |
public static function newRecursiveGroupLayouter3(core:Layouter, gbc:GroupBoundsCalculator):RecursiveGroupLayouter
Creates a new instance of RecursiveGroupLayouter using the given layout algorithm and GroupBoundsCalculator implementation.
Parameters
core:Layouter | |
gbc:GroupBoundsCalculator |
RecursiveGroupLayouter |
routeInterEdges | () | method |
protected function routeInterEdges(graph:LayoutGraph, interEdges:EdgeList):void
This method is called after calculating the overall layout and reroutes the inter-edges, i.e., edges which traverse the boundary of a group node. More precisely, if those edges do not have port candidates or the applied layout algorithm does not support this kind of constraints, the route of inter-edges always ends at the border/center of the corresponding group node. This method identifies such edges and routes them using the specified edge router. By default, these edges are routed straight-line.
Parameters
graph:LayoutGraph — the input graph.
| |
interEdges:EdgeList — the edges which traverse the boundary of a group node.
|
See also
GROUP_NODE_LAYOUTER_DPKEY | Constant |
public static const GROUP_NODE_LAYOUTER_DPKEY:Object = y.layout.grouping.RecursiveGroupLayouter.GROUP_NODE_LAYOUTER_DPKEY
com.yworks.yfiles.base.DataProvider key used to retrieve a com.yworks.yfiles.layout.Layouter instance for each group node. The specified layouter instance is applied to the content of the group node. For the top level elements the core layouter is used. If the data provider returns "null" the corresponding group node is handled non-recursive, i.e., the group node and its content is laid out with the com.yworks.yfiles.layout.Layouter instance specified by the nearest predecessor of the group node (with respect to the grouping hierarchy) which is associated with a layouter. If the content of a group node should not be changed, the group node can be associated with a "null" layouter, e.g., constant NULL_LAYOUTER.
See also
NULL_LAYOUTER | Constant |
public static const NULL_LAYOUTER:Layouter
A constant that represents a layouter implementation that does nothing.