Package | com.yworks.yfiles.layout.tree |
Class | public class TreeLayouter |
Inheritance | TreeLayouter CanonicMultiStageLayouter YObject Object |
See also
Property | Defined By | ||
---|---|---|---|
busAlignment : Number
Specifies the vertical bus alignment for orthogonally routed edge buses. | TreeLayouter | ||
childPlacementPolicy : int
Specifies the layout policy for leaf nodes. | TreeLayouter | ||
comparator : Comparator
Specifies the comparator for outgoing edges at a node This comparator defines the relative order of the child nodes in the layout to be calculated. | TreeLayouter | ||
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 | ||
enforceGlobalLayering : Boolean
Specifies whether or not global layering is enforced. | TreeLayouter | ||
groupingSupported : Boolean
Whether or not grouping support should be enabled. | TreeLayouter | ||
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
Specifies whether integrated edge labeling is enabled. | TreeLayouter | ||
integratedNodeLabeling : Boolean
Specifies whether integrated node labeling is enabled. | TreeLayouter | ||
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 | ||
layoutStyle : int
Specifies the layout style of this layouter. | TreeLayouter | ||
minimalLayerDistance : Number
Specifies the minimal distance between adjacent layers for the layout. | TreeLayouter | ||
minimalNodeDistance : Number
Getter:
Returns the minimum horizontal distance between adjacent nodes for this layouter. | TreeLayouter | ||
modificationMatrix : AbstractRotatableNodePlacer_Matrix
Specifies the modification matrix that is used to rotate / mirror the tree layout. | TreeLayouter | ||
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 | ||
portStyle : int
Specifies the port assignment style. | TreeLayouter | ||
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 | ||
verticalAlignment : Number
Specifies the relative vertical alignment of nodes within their respective layers. | TreeLayouter |
Method | Defined By | ||
---|---|---|---|
TreeLayouter(init:Boolean = true)
Creates a new instance of TreeLayouter. | TreeLayouter | ||
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]
Returns true if the core layouter can layout the given graph structure. | TreeLayouter | ||
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]
Starts the tree layout process
| TreeLayouter | ||
enableOnlyCore():void
Disables all layout stages and performs only the core layouter. | CanonicMultiStageLayouter | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | TreeLayouter | ||
hashCode():int | YObject | ||
[static]
Creates a new instance of TreeLayouter. | TreeLayouter | ||
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 | ||
CanonicMultiStageLayouter | |||
initTreeLayouter():void
Initializes this object. | TreeLayouter |
Constant | Defined By | ||
---|---|---|---|
BORDER_CENTER_PORTS : int = 1 [static]
Port style constant. | TreeLayouter | ||
BORDER_DISTRIBUTED_PORTS : int = 2 [static]
Port style constant. | TreeLayouter | ||
CHILD_PLACEMENT_POLICY_ALL_LEAVES_ON_SAME_LAYER : int = 4 [static]
Symbolic child placement policy specifier. | TreeLayouter | ||
CHILD_PLACEMENT_POLICY_LEAVES_STACKED : int = 0 [static]
Symbolic child placement policy specifier. | TreeLayouter | ||
CHILD_PLACEMENT_POLICY_LEAVES_STACKED_LEFT : int = 1 [static]
Symbolic child placement policy specifier. | TreeLayouter | ||
CHILD_PLACEMENT_POLICY_LEAVES_STACKED_LEFT_AND_RIGHT : int = 3 [static]
Symbolic child placement policy specifier. | TreeLayouter | ||
CHILD_PLACEMENT_POLICY_LEAVES_STACKED_RIGHT : int = 2 [static]
Symbolic child placement policy specifier. | TreeLayouter | ||
CHILD_PLACEMENT_POLICY_SIBLINGS_ON_SAME_LAYER : int = 5 [static]
Symbolic child placement policy specifier. | TreeLayouter | ||
NODE_CENTER_PORTS : int = 0 [static]
Port style constant. | TreeLayouter | ||
ORTHOGONAL_STYLE : int = 1 [static]
Layout style constant. | TreeLayouter | ||
PLAIN_STYLE : int = 0 [static]
Layout style constant. | TreeLayouter | ||
PORT_CONSTRAINTS_AWARE : int = 3 [static]
Port style constant. | TreeLayouter |
busAlignment | property |
busAlignment:Number
Specifies the vertical bus alignment for orthogonally routed edge buses.
The bus alignment determines the relative position of an edge bus in between two subsequent layers of nodes. A value of 0
places the bus at the top right below the parent node; a value of 0.5
places the bus in the middle between parent and child nodes; and a value of 1
places the bus at the bottom right above the child nodes.
Bus alignment is taken into account only for
Defaults to 0.3
.
public function get busAlignment():Number
public function set busAlignment(value:Number):void
See also
childPlacementPolicy | property |
childPlacementPolicy:int
Specifies the layout policy for leaf nodes.
Defaults to CHILD_PLACEMENT_POLICY_SIBLINGS_ON_SAME_LAYER.
public function get childPlacementPolicy():int
public function set childPlacementPolicy(value:int):void
IllegalArgumentException — if the specified policy does not match one of the leaf layout policy constants.
|
See also
comparator | property |
comparator:Comparator
Specifies the comparator for outgoing edges at a node This comparator defines the relative order of the child nodes in the layout to be calculated. By default com.yworks.yfiles.layout.tree.XCoordComparator is set.
public function get comparator():Comparator
public function set comparator(value:Comparator):void
See also
enforceGlobalLayering | property |
enforceGlobalLayering:Boolean
Specifies whether or not global layering is enforced. If this feature is enabled, the algorithm ensures that nodes never span more than one layer. Otherwise, a large node might span two, three, etc layers of smaller nodes to produce a more compact layout.
Disabling this feature to generate more compact layouts will usually result in the algorithm ignoring the specified relative vertical alignment for nodes.
By default, this feature is enabled.
public function get enforceGlobalLayering():Boolean
public function set enforceGlobalLayering(value:Boolean):void
See also
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
Specifies whether integrated edge labeling is enabled.
public function get integratedEdgeLabeling():Boolean
public function set integratedEdgeLabeling(value:Boolean):void
integratedNodeLabeling | property |
integratedNodeLabeling:Boolean
Specifies whether integrated node labeling is enabled.
public function get integratedNodeLabeling():Boolean
public function set integratedNodeLabeling(value:Boolean):void
layoutStyle | property |
layoutStyle:int
Specifies the layout style of this layouter.
public function get layoutStyle():int
public function set layoutStyle(value:int):void
See also
minimalLayerDistance | property |
minimalLayerDistance:Number
Specifies the minimal distance between adjacent layers for the layout. Default value is 40.0.
public function get minimalLayerDistance():Number
public function set minimalLayerDistance(value:Number):void
minimalNodeDistance | property |
minimalNodeDistance:Number
Getter: Returns the minimum horizontal distance between adjacent nodes for this layouter.
Setter: Sets the minimum distance between adjacent nodes within a layer. Default value is 20.0. public function get minimalNodeDistance():Number
public function set minimalNodeDistance(value:Number):void
modificationMatrix | property |
modificationMatrix:AbstractRotatableNodePlacer_Matrix
Specifies the modification matrix that is used to rotate / mirror the tree layout.
public function get modificationMatrix():AbstractRotatableNodePlacer_Matrix
public function set modificationMatrix(value:AbstractRotatableNodePlacer_Matrix):void
portStyle | property |
portStyle:int
Specifies the port assignment style.
public function get portStyle():int
public function set portStyle(value:int):void
See also
verticalAlignment | property |
verticalAlignment:Number
Specifies the relative vertical alignment of nodes within their respective layers.
A value of 0
means nodes are top aligned; a value of 1
means nodes are bottom aligned.
If global layering is not enforced, the value of this property is usually ignored.
Defaults to 0.5
, i.e. nodes are center aligned.
public function get verticalAlignment():Number
public function set verticalAlignment(value:Number):void
See also
TreeLayouter | () | Constructor |
public function TreeLayouter(init:Boolean = true)
Creates a new instance of TreeLayouter.
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.
|
canLayoutCore | () | method |
override public function canLayoutCore(graph:LayoutGraph):Boolean
Returns true if the core layouter can layout the given graph structure. This is the case if the graph is a tree.
Parameters
graph:LayoutGraph |
Boolean |
doLayoutCore | () | method |
override public function doLayoutCore(graph:LayoutGraph):void
Starts the tree layout process
Parameters
graph:LayoutGraph |
getClass | () | method |
override public function getClass():Class
ReturnsClass |
initTreeLayouter | () | method |
protected final function initTreeLayouter():void
Initializes this object. See the documentation of the corresponding factory method newTreeLayouter()
for details.
See also
newTreeLayouter | () | method |
public static function newTreeLayouter():TreeLayouter
Creates a new instance of TreeLayouter.
ReturnsTreeLayouter |
BORDER_CENTER_PORTS | Constant |
public static const BORDER_CENTER_PORTS:int = 1
Port style constant. Ports will lie at the center of a node border.
See also
BORDER_DISTRIBUTED_PORTS | Constant |
public static const BORDER_DISTRIBUTED_PORTS:int = 2
Port style constant. Ports will be distributed evenly on the side of a node.
See also
CHILD_PLACEMENT_POLICY_ALL_LEAVES_ON_SAME_LAYER | Constant |
public static const CHILD_PLACEMENT_POLICY_ALL_LEAVES_ON_SAME_LAYER:int = 4
Symbolic child placement policy specifier. This results in a Dendrogram-style layout with all leaf nodes being placed in one layer (i.e. all leaves are being placed on one horizontal line in a top to bottom or bottom to top layout). A Dendrogram layout is often applied in computational biology in order to show clustering of genes.
See also
CHILD_PLACEMENT_POLICY_LEAVES_STACKED | Constant |
public static const CHILD_PLACEMENT_POLICY_LEAVES_STACKED:int = 0
Symbolic child placement policy specifier. This setting configures the algorithm for a stacked style of leaf nodes. In this context, stacked means that leaf nodes that connect to the same root node are placed one upon the other. This results in horizontally compact layouts. Additionally, this policy tries to balance stack heights. I.e. for each subtree that consists of leaf nodes only, CHILD_PLACEMENT_POLICY_LEAVES_STACKED_RIGHT or CHILD_PLACEMENT_POLICY_LEAVES_STACKED_LEFT_AND_RIGHT will be used depending on the number of leaves in the subtree.
See also
CHILD_PLACEMENT_POLICY_LEAVES_STACKED_LEFT | Constant |
public static const CHILD_PLACEMENT_POLICY_LEAVES_STACKED_LEFT:int = 1
Symbolic child placement policy specifier. This setting configures the algorithm for a stacked style of leaf nodes. In this context, stacked means that leaf nodes that connect to the same root node are placed one upon the other. This results in horizontally compact layouts. Moreover, the stack of leaf nodes is on the left.
See also
CHILD_PLACEMENT_POLICY_LEAVES_STACKED_LEFT_AND_RIGHT | Constant |
public static const CHILD_PLACEMENT_POLICY_LEAVES_STACKED_LEFT_AND_RIGHT:int = 3
Symbolic child placement policy specifier. This setting configures the algorithm for a stacked style of leaf nodes. In this context, stacked means that leaf nodes that connect to the same root node are placed one upon the other. This results in horizontally compact layouts. Moreover, leaf nodes are distributed among two stacks, one on the left and one on the right.
See also
CHILD_PLACEMENT_POLICY_LEAVES_STACKED_RIGHT | Constant |
public static const CHILD_PLACEMENT_POLICY_LEAVES_STACKED_RIGHT:int = 2
Symbolic child placement policy specifier. This setting configures the algorithm for a stacked style of leaf nodes. In this context, stacked means that leaf nodes that connect to the same root node are placed one upon the other. This results in horizontally compact layouts. Moreover, the stack of leaf nodes is on the right.
See also
CHILD_PLACEMENT_POLICY_SIBLINGS_ON_SAME_LAYER | Constant |
public static const CHILD_PLACEMENT_POLICY_SIBLINGS_ON_SAME_LAYER:int = 5
Symbolic child placement policy specifier. This setting configures the algorithm to place siblings (leaf nodes with the same parent node) in the same layer (i.e. siblings are being placed on one horizontal line in a top to bottom or bottom to top layout).
See also
NODE_CENTER_PORTS | Constant |
public static const NODE_CENTER_PORTS:int = 0
Port style constant. Uses (0,0) as port offset.
See also
ORTHOGONAL_STYLE | Constant |
public static const ORTHOGONAL_STYLE:int = 1
Layout style constant. Draw edges orthogonally in a bus-like fashion.
See also
PLAIN_STYLE | Constant |
public static const PLAIN_STYLE:int = 0
Layout style constant. Draw edges as straight lines.
See also
PORT_CONSTRAINTS_AWARE | Constant |
public static const PORT_CONSTRAINTS_AWARE:int = 3
Port style constant. The specified port constraints will be considered.
See also