Provides tree layout style algorithms.

Implementations support radial layout of (sub)trees, compact layout obeying a given aspect ratio, and also horizontal/vertical layout of directed (and undirected) trees.

Class com.yworks.yfiles.layout.tree.GenericTreeLayouter enables the use of com.yworks.yfiles.layout.tree.NodePlacer implementations which are invoked to calculate the subtrees. Predefined node placers that inherit from abstract class com.yworks.yfiles.layout.tree.AbstractRotatableNodePlacer allow for rotation of subtrees.
Note that com.yworks.yfiles.layout.tree.GenericTreeLayouter can be used to emulate the results generated by both com.yworks.yfiles.layout.tree.TreeLayouter and com.yworks.yfiles.layout.tree.HVTreeLayouter .

Related Documentation

See the yFiles FLEX Developer's Guide (Analysis and Layout Part) section on Tree Layout for descriptions of the yFiles tree layout style algorithms.
The section Generic Tree Layout extensively discusses the advanced capabilities of class GenericTreeLayouter and also its numerous NodePlacer implementations.



Interfaces
 InterfaceDescription
 FromSketchNodePlacer A FromSketchNodePlacer is responsible for arranging its nodes using a comparator, which sorts the outgoing edges of a node according to the position of their target nodes in the graph before the actual placement happens.
 NodePlacer This interface is used by com.yworks.yfiles.layout.tree.GenericTreeLayouter.
 PortAssignment This interface is used by com.yworks.yfiles.layout.tree.GenericTreeLayouter.
 Processor A processor is the possibility for each NodePlacer to prepare (and clean up) the graph for its children. It is created within com.yworks.yfiles.layout.tree.NodePlacer.createProcessor() and called by the GenericTreeLayouter at specific positions of the life-cycle. The processor may change the values within the DataMaps for its children.
Classes
 ClassDescription
 AbstractNodePlacer Utility class that serves as a basis for implementations of the com.yworks.yfiles.layout.tree.NodePlacer interface.
 AbstractRotatableNodePlacer This is an abstract base class for NodePlacers that supports rotations. "Supporting rotation" means that the NodePlacers only implement the default direction (e.g.
 AbstractRotatableNodePlacer_Matrix Instances of this class may be used to configure the com.yworks.yfiles.layout.tree.AbstractRotatableNodePlacer.
 AbstractRotatableNodePlacer_RootAlignment This class represents the horizontal alignment of the root node.
 ARNodePlacer This class is used by com.yworks.yfiles.layout.tree.GenericTreeLayouter and implements a sophisticated com.yworks.yfiles.layout.tree.NodePlacer.
 ARTreeLayouter This tree layouter tries to generate compact tree layouts with a certain aspect ratio.
 AssistantPlacer The assistant placer is a NodePlacer that delegates the node placement to two different node placers depending on the type of the children. The type of a child is recognized using a DataProvider providing boolean values.
 BalloonLayouter A tree layouter that lays out the subtrees of the tree in a balloon-like fashion.
 BalloonLayouter_NodeInfo Encapsulates information bound to a node during the algorithm calculates a layout.
 BusPlacer The BusPlacer is a special NodePlacer that creates a bus where all child nodes and the root node are connected to. The BusPlacer is rotatable using the constructor 2().
 DefaultNodePlacer Versatile default implementation of com.yworks.yfiles.layout.tree.NodePlacer used by com.yworks.yfiles.layout.tree.GenericTreeLayouter.
 DefaultPortAssignment This class provides simple default port assignment strategies.
 DelegatingNodePlacer The DelegatingNodePlacer may be used to layout the children of the actual node with two different NodePlacers.
 DendrogramPlacer This is an implementation of the com.yworks.yfiles.layout.tree.NodePlacer interface that can be used to create dendrogram-like tree layouts.
 DoubleLinePlacer The DoubleLinePlacer is a special node placer that places its children in two lines. This node placer is especially useful for leaves with great width.
 FreePlacer Placer that can be used as simple "pseudo"-placer.
 GenericTreeLayouter This class implements the basis of a generic tree layout algorithm.
 GenericTreeLayouter_SubtreeShape Instances of this class are used to represent the shape of subtrees during the layout.
 GridNodePlacer This NodePlacer arranges nodes into a grid.
 GroupedNodePlacer A com.yworks.yfiles.layout.tree.NodePlacer that places the children of a local root in groups.
 HVTreeLayouter This tree layouter allows to layout a tree such that each subgraph rooted at a node can either have a horizontal or vertical layout.
 LayeredNodePlacer This NodePlacer calculates and respects layers.
 LeafPlacer This implementation can be used to "place" leafs.
 LeftRightPlacer The LeftRightPlacer is a NodePlacer that arranges the Nodes on the left and right side of a vertical bus.
 LeftRightPlacer_LeftRightDataProvider Utility class providing a method to determine if a given node is aligned left (true) or right (false) to the parent node.
 MultiParentDescriptor This class is used by com.yworks.yfiles.layout.tree.GenericTreeLayouter to determine the desired layout of nodes that constitute a multi-parent structure.
 NodeOrderComparator This comparator compares edges by examining the com.yworks.bridge.util.Comparable that is obtained by passing the target nodes (com.yworks.yfiles.base.Edge.target()) to the get method (com.yworks.yfiles.base.DataProvider.getObject()) of the com.yworks.yfiles.base.DataProvider bound to the graph via the NODE_ORDER_DPKEY key.
 NodePlacerCompanion 
 SimpleNodePlacer This is a "default" NodePlacer.
 TreeComponentLayouter This stage can be used to do mix layouts for tree-like subgraph structures and the non-tree like rest of a graph.
 TreeLayouter Implementation of a layout algorithm for trees.
 TreeReductionStage This stage can be used to layout non-tree structures with a tree layout algorithm.
 XCoordComparator This comparator compares edges by examining the x-coordinates of the centers of their target nodes.