Search this API

Package y.layout.tree

Provides tree layout style algorithms.

See:
          Description

Interface Summary
FromSketchNodePlacer A FromSketchNodePlacer arranges the subtrees while taking the initial locations of the nodes into account.
NodePlacer A NodePlacer is responsible for the arrangement of a local root node and all of its subtrees.
PortAssignment A PortAssignment places the ports of edges connecting to the same node.
Processor A Processor provides the possibility for each NodePlacer to prepare (and clean up) the graph for the children of the local root.
 

Class Summary
AbstractNodePlacer Abstract base class for implementations of the NodePlacer interface.
AbstractRotatableNodePlacer Abstract base class for NodePlacers that support rotations of the subtrees.
AbstractRotatableNodePlacer.Matrix A matrix describes the rotation of the subtree handled by AbstractRotatableNodePlacer.
AbstractRotatableNodePlacer.RootAlignment A AbstractRotatableNodePlacer.RootAlignment describes how a local root node is arranged in relation to its children.
ARNodePlacer This NodePlacer places the subtrees such that the overall aspect ratio of the arranged subtree will be close to a preferred aspect ratio.
ARTreeLayouter The ARTreeLayouter arranges tree graphs in a compact fashion.
AssistantPlacer The AssistantPlacer places nodes that are marked as assistants left and right of their parents and all other nodes below the assistant nodes.
BalloonLayouter A tree layout algorithm that arranges the subtrees of the tree in a balloon-like fashion.
BalloonLayouter.NodeInfo Encapsulates information bound to a node while the algorithm calculates a layout.
BusPlacer The BusPlacer creates a bus to which all child nodes and the local root node are connected.
CompactNodePlacer The CompactNodePlacer produces a compact placement of the children.
DefaultNodePlacer DefaultNodePlacer is the default implementation of interface NodePlacer.
DefaultPortAssignment The DefaultPortAssignment provides some simple port assignment styles.
DelegatingNodePlacer DelegatingNodePlacer delegates the arrangement of the children to two different NodePlacers.
DendrogramPlacer The DendrogramPlacer arranges subtrees as dendrograms.
DoubleLinePlacer The DoubleLinePlacer arranges the children of a local root alternating in two lines.
FreePlacer A FreePlacer is a simple pseudo-placer.
GenericTreeLayouter This layout algorithm arranges graphs with a tree structure.
GenericTreeLayouter.SubtreeShape A GenericTreeLayouter.SubtreeShape represents the position and the borders of a subtree.
GridNodePlacer The GridNodePlacer arranges the shapes of the children of a local root in a grid.
GroupedNodePlacer This NodePlacer places the children of a local root in groups.
HVTreeLayouter The HVTreeLayouter arranges the subgraphs of a tree horizontally and vertically.
LayeredNodePlacer A LayeredNodePlacer arranges the nodes of a subtree respecting layers.
LeafPlacer A LeafPlacer creates a SubtreeShape for a leaf node and routes its incoming edge at the target side.
LeftRightPlacer The LeftRightPlacer arranges the children in a subtree on the left and the right of a vertical bus.
LeftRightPlacer.LeftRightDataProvider A special DataProvider that determines whether a given node is placed left or right of the parent node.
MultiParentDescriptor The MultiParentDescriptor provides style information for multi-parent structures.
NodeOrderComparator The NodeOrderComparator compares edges according to a specified order.
SimpleNodePlacer The SimpleNodePlacer arranges all children of a local root in a single row.
TreeComponentLayouter The TreeComponentLayouter arranges tree-like subgraph structures in a mixed layout style.
TreeLayouter This layout algorithm arranges graphs with a tree structure.
TreeMapLayouter This layout algorithm produces tree map layouts.
TreeMapLayouter.NodeWeightComparator A Comparator that compares two nodes with respect to their weight value defined via the DataProvider registered with TreeMapLayouter.NODE_WEIGHT_DPKEY.
TreeReductionStage The TreeReductionStage temporarily reduces general graphs to trees.
XCoordComparator This Comparator compares edges by examining the x-coordinates of the centers of their target nodes.
 

Package y.layout.tree Description

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 TreeLayouter arranges directed and undirected trees in a main layout direction.

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

Example graphs


Default tree layout

Balloon layout

Dendrogram layout

General graph, non-tree edges are marked

Related Documentation

See the yFiles Developer's Guide 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.

 

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.