Package | com.yworks.yfiles.layout.tree |
Class | public class GenericTreeLayouter |
Inheritance | GenericTreeLayouter CanonicMultiStageLayouter YObject Object |
See also
Property | Defined By | ||
---|---|---|---|
componentLayouter : LayoutStage
Specifies the LayoutStage responsible for laying out the connected components of the graph. | CanonicMultiStageLayouter | ||
componentLayouterEnabled : Boolean
Getter:
Returns whether or not ComponentLayouter is enabled. | CanonicMultiStageLayouter | ||
defaultChildComparator : Comparator
Getter:
Returns the default Comparator instance or null that will be used for those subtrees, that don't have their own specific instance set via the appropriate DataProvider. | GenericTreeLayouter | ||
defaultLeafPlacer : NodePlacer
Specifies the default com.yworks.yfiles.layout.tree.NodePlacer instance that will be used for the leaf nodes of the tree. | GenericTreeLayouter | ||
defaultNodePlacer : NodePlacer
Specifies the default com.yworks.yfiles.layout.tree.NodePlacer instance that will be used for those subtrees, that don't have their own specific instance set via the appropriate DataProvider. | GenericTreeLayouter | ||
defaultPortAssignment : PortAssignment
Specifies the default com.yworks.yfiles.layout.tree.PortAssignment instance that will be used for those subtrees, that don't have their own specific instance set via the appropriate DataProvider. | GenericTreeLayouter | ||
groupingSupported : Boolean
Whether or not grouping support should be enabled. | GenericTreeLayouter | ||
groupNodeHider : LayoutStage
Specifies the LayoutStage that is responsible for hiding away grouping information for the layout algorithm. | CanonicMultiStageLayouter | ||
hideGroupNodes : Boolean
Specifies whether or not to hide away group nodes before the layout begins. | CanonicMultiStageLayouter | ||
integratedEdgeLabeling : Boolean
Getter:
Returns whether integrated edge labeling is enabled (extension of the shapes of subtrees with the labels of the edges). | GenericTreeLayouter | ||
integratedNodeLabeling : Boolean
Getter:
Returns whether integrated node labeling is enabled (extension of the shapes of the nodes with its labels). | GenericTreeLayouter | ||
labelLayouter : LayoutStage
Getter:
Returns the algorithm used for placing labels. | CanonicMultiStageLayouter | ||
labelLayouterEnabled : Boolean
Getter:
Returns whether or not LabelLayouter is enabled. | CanonicMultiStageLayouter | ||
layoutOrientation : int
Specifies the main layout orientation. | CanonicMultiStageLayouter | ||
multiParentAllowed : Boolean
Determines whether or not multi-parent structures are allowed for this tree layout. | GenericTreeLayouter | ||
orientationLayouter : LayoutStage
Specifies the LayoutStage that is responsible for changing the orientation of the computed layout. | CanonicMultiStageLayouter | ||
orientationLayouterEnabled : Boolean
Getter:
Returns whether or not the OrientationLayouter is enabled. | CanonicMultiStageLayouter | ||
parallelEdgeLayouter : LayoutStage
Getter:
Returns the LayoutStage responsible for routing parallel edges. | CanonicMultiStageLayouter | ||
parallelEdgeLayouterEnabled : Boolean
Getter:
Returns whether or not the ParallelEdgeLayouter is enabled. | CanonicMultiStageLayouter | ||
selfLoopLayouter : LayoutStage
Getter:
Returns the LayoutStage used for routing Self-loops. | CanonicMultiStageLayouter | ||
selfLoopLayouterEnabled : Boolean
Getter:
Returns whether or not the SelfLoopLayouter is enabled. | CanonicMultiStageLayouter | ||
subgraphLayouter : LayoutStage
Specifies the LayoutStage that is responsible for constraining the layout process to a subgraph of the target graph. | CanonicMultiStageLayouter | ||
subgraphLayouterEnabled : Boolean
Getter:
Returns whether or not the SubgraphLayouter is enabled. | CanonicMultiStageLayouter |
Property | Defined By | ||
---|---|---|---|
graph : LayoutGraph
the graph this layout is running on
| GenericTreeLayouter | ||
sourceGroupDataAcceptor : DataAcceptor [read-only]
Returns a com.yworks.yfiles.base.DataAcceptor implementation that can be used to overwrite edge grouping at source temporarily for use during the layout. | GenericTreeLayouter | ||
sourcePortConstraintDataAcceptor : DataAcceptor [read-only]
Returns a com.yworks.yfiles.base.DataAcceptor implementation that can be used to overwrite the source port constraint ( com.yworks.yfiles.layout.PortConstraint temporarily for use during the layout. | GenericTreeLayouter | ||
targetGroupDataAcceptor : DataAcceptor [read-only]
Returns a com.yworks.yfiles.base.DataAcceptor implementation that can be used to overwrite edge grouping at target temporarily for use during the layout. | GenericTreeLayouter | ||
targetPortConstraintDataAcceptor : DataAcceptor [read-only]
Returns a com.yworks.yfiles.base.DataAcceptor implementation that can be used to overwrite the target port constraint ( com.yworks.yfiles.layout.PortConstraint temporarily for use during the layout. | GenericTreeLayouter |
Method | Defined By | ||
---|---|---|---|
GenericTreeLayouter(init:Boolean = true)
Creates a new GenericTreeLayouter with a default com.yworks.yfiles.layout.tree.NodePlacer, a default com.yworks.yfiles.layout.tree.PortAssignment instance and no default edge comparator. | GenericTreeLayouter | ||
appendStage(stage:LayoutStage):void
Appends a stage to the layout pipeline. | CanonicMultiStageLayouter | ||
Returns a layout for the given layout graph. | CanonicMultiStageLayouter | ||
Returns a layout for the given graph interface and layout. | CanonicMultiStageLayouter | ||
canLayout(graph:LayoutGraph):Boolean
Tests whether or not the given graph can be laid out by this layouter. | CanonicMultiStageLayouter | ||
canLayoutCore(graph:LayoutGraph):Boolean [override] | GenericTreeLayouter | ||
doLayout(layoutGraph:LayoutGraph):void
Calculates a layout for the given graph. | CanonicMultiStageLayouter | ||
Calculates a layout for the given graph interface and layout. | CanonicMultiStageLayouter | ||
doLayoutCore(graph:LayoutGraph):void [override] | GenericTreeLayouter | ||
enableOnlyCore():void
Disables all layout stages and performs only the core layouter. | CanonicMultiStageLayouter | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | GenericTreeLayouter | ||
hashCode():int | YObject | ||
[static]
Creates a new GenericTreeLayouter with a default com.yworks.yfiles.layout.tree.NodePlacer, a default com.yworks.yfiles.layout.tree.PortAssignment instance and no default edge comparator. | GenericTreeLayouter | ||
prependStage(stage:LayoutStage):void
Prepends a stage to the layout pipeline. | CanonicMultiStageLayouter | ||
removeStage(stage:LayoutStage):void
Removes a LayoutStage that has been previously added by the methods appendStage() or prependStage(). | CanonicMultiStageLayouter |
Method | Defined By | ||
---|---|---|---|
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 | ||
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 | ||
This method is called initially with the graph to calculate a rooted tree. | GenericTreeLayouter | ||
This method returns a Comparator instance or null that will be used for the sorting of the outgoing edges at the given Node. | GenericTreeLayouter | ||
This method returns a com.yworks.yfiles.layout.tree.NodePlacer instance that will be used for the placement of the root node and the subtree shapes. | GenericTreeLayouter | ||
Factory method that creates a SubtreeShape for a given node, that consists of the bounds of the node only. | GenericTreeLayouter | ||
This method returns a com.yworks.yfiles.layout.tree.PortAssignment instance that will be used for the port assignments at the given Node. | GenericTreeLayouter | ||
getRootsArray(root:Node):Vector.<Object>
Returns the array of the nodes to be laid out. | GenericTreeLayouter | ||
Provides access to the SubTreeShape instances for each node. | GenericTreeLayouter | ||
CanonicMultiStageLayouter | |||
initGenericTreeLayouter():void
Initializes this object. | GenericTreeLayouter | ||
This is the core method of the algorithm. | GenericTreeLayouter | ||
reverseEdges(reversedEdges:EdgeList):void
This method is used for the actual reversal of edges. | GenericTreeLayouter |
Constant | Defined By | ||
---|---|---|---|
CHILD_COMPARATOR_DPKEY : Object = y.layout.tree.GenericTreeLayouter.CHILD_COMPARATOR_DPKEY [static]
DataProvider key that can be registered with the graph to provide each node with its own Comparator instance that will be used to sort its outgoing edges. | GenericTreeLayouter | ||
CRITICAL_EDGE_DPKEY : Object = y.layout.tree.GenericTreeLayouter.CRITICAL_EDGE_DPKEY [static]
com.yworks.yfiles.base.DataProvider key used to store the priority (integer values) for "critical" edges. | GenericTreeLayouter | ||
MULTI_PARENT_DESCRIPTOR_DPKEY : Object = y.layout.tree.GenericTreeLayouter.MULTI_PARENT_DESCRIPTOR_DPKEY [static]
com.yworks.yfiles.base.DataProvider key used to retrieve com.yworks.yfiles.layout.tree.MultiParentDescriptor instances for each node that belongs to a multi-parent structure. | GenericTreeLayouter | ||
NODE_PLACER_DPKEY : Object = y.layout.tree.GenericTreeLayouter.NODE_PLACER_DPKEY [static]
DataProvider key that can be registered with the graph to provide each node with its own com.yworks.yfiles.layout.tree.NodePlacer instance. | GenericTreeLayouter | ||
PORT_ASSIGNMENT_DPKEY : Object = y.layout.tree.GenericTreeLayouter.PORT_ASSIGNMENT_DPKEY [static]
DataProvider key that can be registered with the graph to provide each node with its own com.yworks.yfiles.layout.tree.PortAssignment instance. | GenericTreeLayouter |
defaultChildComparator | property |
defaultChildComparator:Comparator
Getter:
Returns the default Comparator instance or null
that will be used for those subtrees, that don't have their own specific instance set via the appropriate DataProvider.
null
which implies no sorting by default.
public function get defaultChildComparator():Comparator
public function set defaultChildComparator(value:Comparator):void
See also
defaultLeafPlacer | property |
defaultLeafPlacer:NodePlacer
Specifies the default com.yworks.yfiles.layout.tree.NodePlacer instance that will be used for the leaf nodes of the tree.
public function get defaultLeafPlacer():NodePlacer
public function set defaultLeafPlacer(value:NodePlacer):void
See also
defaultNodePlacer | property |
defaultNodePlacer:NodePlacer
Specifies the default com.yworks.yfiles.layout.tree.NodePlacer instance that will be used for those subtrees, that don't have their own specific instance set via the appropriate DataProvider.
This should be non-null
, unless it is guaranteed that for any node in the graph there is a specific instance provided by the registered DataProvider instance.
public function get defaultNodePlacer():NodePlacer
public function set defaultNodePlacer(value:NodePlacer):void
See also
defaultPortAssignment | property |
defaultPortAssignment:PortAssignment
Specifies the default com.yworks.yfiles.layout.tree.PortAssignment instance that will be used for those subtrees, that don't have their own specific instance set via the appropriate DataProvider.
This should be non-null
, unless it is guaranteed that for any node in the graph there is a specific instance provided by the registered DataProvider instance.
public function get defaultPortAssignment():PortAssignment
public function set defaultPortAssignment(value:PortAssignment):void
See also
graph | property |
protected var graph:LayoutGraph
the graph this layout is running on
groupingSupported | property |
groupingSupported:Boolean
Whether or not grouping support should be enabled. Note that the grouping only works correctly, if each group represents a complete subtree. This means that for each group there is a node v such that the group contains exactly v and all its descendants.
public function get groupingSupported():Boolean
public function set groupingSupported(value:Boolean):void
integratedEdgeLabeling | property |
integratedEdgeLabeling:Boolean
Getter: Returns whether integrated edge labeling is enabled (extension of the shapes of subtrees with the labels of the edges).
Setter: Specifies whether or not to use integrated edge labeling (extension of the shapes of the subtrees with the labels for the edges). public function get integratedEdgeLabeling():Boolean
public function set integratedEdgeLabeling(value:Boolean):void
integratedNodeLabeling | property |
integratedNodeLabeling:Boolean
Getter: Returns whether integrated node labeling is enabled (extension of the shapes of the nodes with its labels).
Setter: Specifies whether or not to use integrated node labeling. If set totrue
, the shape of the nodes will be extended with the shapes of its labels.
public function get integratedNodeLabeling():Boolean
public function set integratedNodeLabeling(value:Boolean):void
multiParentAllowed | property |
multiParentAllowed:Boolean
Determines whether or not multi-parent structures are allowed for this tree layout.
If multi-parent structures are allowed, the directed input graph may contain structures of multiple nodes that share the same predecessors as well as the same successors. All nodes belonging to such a structure are placed side by side and the incident edges are routed in a bus-style.
Note that if the input graph contains groups, all nodes belonging to the same multi-parent structure must be associated with the same group node, i.e., it is not possible to assign these nodes to different group nodes.
By default multi-parent structures are not allowed.
As for the different ways in which the com.yworks.yfiles.layout.tree.NodePlacer s route their edges, multi-parent structures only work for some NodePlacer
s:
public function get multiParentAllowed():Boolean
public function set multiParentAllowed(value:Boolean):void
See also
sourceGroupDataAcceptor | property |
sourceGroupDataAcceptor:DataAcceptor
[read-only] Returns a com.yworks.yfiles.base.DataAcceptor implementation that can be used to overwrite edge grouping at source temporarily for use during the layout.
protected function get sourceGroupDataAcceptor():DataAcceptor
See also
sourcePortConstraintDataAcceptor | property |
sourcePortConstraintDataAcceptor:DataAcceptor
[read-only] Returns a com.yworks.yfiles.base.DataAcceptor implementation that can be used to overwrite the source port constraint ( com.yworks.yfiles.layout.PortConstraint temporarily for use during the layout.
protected function get sourcePortConstraintDataAcceptor():DataAcceptor
See also
targetGroupDataAcceptor | property |
targetGroupDataAcceptor:DataAcceptor
[read-only] Returns a com.yworks.yfiles.base.DataAcceptor implementation that can be used to overwrite edge grouping at target temporarily for use during the layout.
protected function get targetGroupDataAcceptor():DataAcceptor
See also
targetPortConstraintDataAcceptor | property |
targetPortConstraintDataAcceptor:DataAcceptor
[read-only] Returns a com.yworks.yfiles.base.DataAcceptor implementation that can be used to overwrite the target port constraint ( com.yworks.yfiles.layout.PortConstraint temporarily for use during the layout.
protected function get targetPortConstraintDataAcceptor():DataAcceptor
See also
GenericTreeLayouter | () | Constructor |
public function GenericTreeLayouter(init:Boolean = true)
Creates a new GenericTreeLayouter with a default com.yworks.yfiles.layout.tree.NodePlacer, a default com.yworks.yfiles.layout.tree.PortAssignment instance and no default edge comparator.
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.
|
See also
canLayoutCore | () | method |
override public function canLayoutCore(graph:LayoutGraph):Boolean
Parameters
graph:LayoutGraph |
Boolean |
directTree | () | method |
protected function directTree():EdgeList
This method is called initially with the graph to calculate a rooted tree. It returns a list of edges that have to be reversed in order for the graph to become a valid rooted and directed tree.
ReturnsEdgeList — an EdgeList containing all the edges that need to be reversed
|
doLayoutCore | () | method |
getChildNodeInEdgeComparator | () | method |
protected function getChildNodeInEdgeComparator(localRoot:Node):Comparator
This method returns a Comparator instance or null
that will be used for the sorting of the outgoing edges at the given Node.
This method is allowed to return a shared instance for multiple different nodes, the instances are not used after subsequent calls to this method.
Parameters
localRoot:Node — the root of the local subtree
|
Comparator — a readily configured instance of Comparator or null that can be used sort the outgoing edges of the given node
|
See also
getClass | () | method |
override public function getClass():Class
ReturnsClass |
getNodePlacer | () | method |
protected function getNodePlacer(localRoot:Node):NodePlacer
This method returns a com.yworks.yfiles.layout.tree.NodePlacer instance that will be used for the placement of the root node and the subtree shapes. This method is allowed to return a shared instance for multiple different nodes, the instances are not used after subsequent calls to this method.
Parameters
localRoot:Node — the root of the local subtree
|
NodePlacer — a readily configured instance of com.yworks.yfiles.layout.tree.NodePlacer that can be used to layout the subtree under the given local root node.
|
See also
getNodeShape | () | method |
protected function getNodeShape(node:Node):GenericTreeLayouter_SubtreeShape
Factory method that creates a SubtreeShape for a given node, that consists of the bounds of the node only.
Parameters
node:Node — the node that will be represented by a SubTreeShape instance
|
GenericTreeLayouter_SubtreeShape — a newly created SubtreeShape describing the bounds of the given node
|
getPortAssignment | () | method |
protected function getPortAssignment(localRoot:Node):PortAssignment
This method returns a com.yworks.yfiles.layout.tree.PortAssignment instance that will be used for the port assignments at the given Node. This method is allowed to return a shared instance for multiple different nodes, the instances are not used after subsequent calls to this method.
Parameters
localRoot:Node — the root of the local subtree
|
PortAssignment — a readily configured instance of com.yworks.yfiles.layout.tree.PortAssignment that can be used to assign the ports of the edges at the given local root node.
|
See also
getRootsArray | () | method |
protected function getRootsArray(root:Node):Vector.<Object>
Returns the array of the nodes to be laid out. The order of the elements is chosen so that no parent is laid out before one of its successors.
Parameters
root:Node — the node that should be used as the root of the tree
|
Vector.<Object> — all nodes in the graph that should be laid out in order
|
getSubtreeShape | () | method |
protected function getSubtreeShape(localRoot:Node):GenericTreeLayouter_SubtreeShape
Provides access to the SubTreeShape instances for each node. Those instances should be modified only during the layout of the parent node.
Parameters
localRoot:Node — the node for which the subtree should be returned
|
GenericTreeLayouter_SubtreeShape — the SubTreeShape instance if it has been calculated already or null otherwise
|
initGenericTreeLayouter | () | method |
protected final function initGenericTreeLayouter():void
Initializes this object. See the documentation of the corresponding factory method newGenericTreeLayouter()
for details.
See also
layoutRoot | () | method |
protected function layoutRoot(localRoot:Node):GenericTreeLayouter_SubtreeShape
This is the core method of the algorithm.
This method is invoked for each node in the tree exactly once in such an order that all of the child nodes of each node have already been calculated by the time of the method invocation. This method uses the getSubtreeShape() callback to retrieve the shapes of the subtrees of all of the children of localRoot
.
Parameters
localRoot:Node — The root to be laid out together with its SubtreeShapes
|
GenericTreeLayouter_SubtreeShape — the combined SubtreeShape of the local root node and all of its children and connecting edges
|
See also
newGenericTreeLayouter | () | method |
public static function newGenericTreeLayouter():GenericTreeLayouter
Creates a new GenericTreeLayouter with a default com.yworks.yfiles.layout.tree.NodePlacer, a default com.yworks.yfiles.layout.tree.PortAssignment instance and no default edge comparator.
ReturnsGenericTreeLayouter |
See also
reverseEdges | () | method |
protected function reverseEdges(reversedEdges:EdgeList):void
This method is used for the actual reversal of edges. It will be called initially after the directTree() method and finally after the layout has been calculated.
Parameters
reversedEdges:EdgeList — the edges that will be reversed by this method
|
See also
CHILD_COMPARATOR_DPKEY | Constant |
public static const CHILD_COMPARATOR_DPKEY:Object = y.layout.tree.GenericTreeLayouter.CHILD_COMPARATOR_DPKEY
DataProvider key that can be registered with the graph to provide each node with its own Comparator instance that will be used to sort its outgoing edges.
See also
CRITICAL_EDGE_DPKEY | Constant |
public static const CRITICAL_EDGE_DPKEY:Object = y.layout.tree.GenericTreeLayouter.CRITICAL_EDGE_DPKEY
com.yworks.yfiles.base.DataProvider key used to store the priority (integer values) for "critical" edges. The layouter tries to align each node pair that is connected by a critical edge (integer value > 0). This feature can for example be utilized to highlight different edge paths that are relevant for a user. Conflicts between different critical edges are always resolved in favor of the higher priority.
Critical edges will always align the centers of source and target node, thus replace the current root alignment of the com.yworks.yfiles.layout.tree.NodePlacer.
Note that the critical edge may not be straight if subtrees are rotated or port constraints are assigned.
This feature is only supported by the following NodePlacer
s:
See also
MULTI_PARENT_DESCRIPTOR_DPKEY | Constant |
public static const MULTI_PARENT_DESCRIPTOR_DPKEY:Object = y.layout.tree.GenericTreeLayouter.MULTI_PARENT_DESCRIPTOR_DPKEY
com.yworks.yfiles.base.DataProvider key used to retrieve com.yworks.yfiles.layout.tree.MultiParentDescriptor instances for each node that belongs to a multi-parent structure. The returned descriptor affects the layout of the multi-parent structure.
Note that this key is only considered if multi-parent structures are allowed, see multiParentAllowed . Furthermore, all nodes belonging to the same multi-parent structure should return the same descriptor.
See also
NODE_PLACER_DPKEY | Constant |
public static const NODE_PLACER_DPKEY:Object = y.layout.tree.GenericTreeLayouter.NODE_PLACER_DPKEY
DataProvider key that can be registered with the graph to provide each node with its own com.yworks.yfiles.layout.tree.NodePlacer instance.
See also
PORT_ASSIGNMENT_DPKEY | Constant |
public static const PORT_ASSIGNMENT_DPKEY:Object = y.layout.tree.GenericTreeLayouter.PORT_ASSIGNMENT_DPKEY
DataProvider key that can be registered with the graph to provide each node with its own com.yworks.yfiles.layout.tree.PortAssignment instance.
See also