A ISubtreePlacer is responsible for the arrangement of a local root node and all of its subtrees.
Inheritance Hierarchy
Remarks
Subtrees are represented as SubtreeShapes with a connecting edge to the root of the subtree.
Implementations of this interface have to:
- arrange the SubtreeShapes and the root node (only the relative position matters, shapes can be placed at any absolute location, TreeLayout will perform the final alignment).
- perform the edge routing from the root node to all child nodes with respect to the connector provided by the SubtreeShapes
- calculate the union of the SubtreeShapes and the shape of the root node as well as any added edges
- initialize the connector of the root node with respect to the preferred connection direction
- return the SubtreeShape for the subtree including the local root
See Also
Developer's Guide
Members
No filters for this type
Methods
Creates an optional ISubtreePlacerProcessor for pre- and post-processing.
Creates an optional ISubtreePlacerProcessor for pre- and post-processing.
This method is called by TreeLayout before arranging the SubtreeShapes. If no pre- or post-processing is needed, this method may return
null.abstract
Parameters
- treeLayout: TreeLayout
- the current TreeLayout instance
- graph: LayoutGraph
- the input graph
- currentRoot: LayoutNode
- the root node handled by this ISubtreePlacer
Return Value
- ISubtreePlacerProcessor
- a ISubtreePlacerProcessor instance or
null
Implemented in
BusSubtreePlacer.createProcessor, CompactSubtreePlacer.createProcessor, MultiSplitSubtreePlacer.createProcessor, SingleSplitSubtreePlacer.createProcessor, AspectRatioSubtreePlacer.createProcessor, AssistantSubtreePlacer.createProcessor, DendrogramSubtreePlacer.createProcessor, DoubleLayerSubtreePlacer.createProcessor, FixedSubtreePlacer.createProcessor, LeftRightSubtreePlacer.createProcessor, LevelAlignedSubtreePlacer.createProcessor, MultiLayerSubtreePlacer.createProcessor, SingleLayerSubtreePlacer.createProcessordetermineChildConnectors
(localRoot: LayoutNode, connectorMap: IMapper<LayoutNode, ParentConnectorDirection>)abstractProvides the direction of the connector to the SubtreeShape for each child node.
determineChildConnectors
(localRoot: LayoutNode, connectorMap: IMapper<LayoutNode, ParentConnectorDirection>)abstract
Provides the direction of the connector to the SubtreeShape for each child node.
This method is called by TreeLayout before the SubtreeShapes for the children of the local root node are calculated. The direction specifiers are stored in the given map for all child nodes of the local root.
abstract
Parameters
- localRoot: LayoutNode
- the local root node
- connectorMap: IMapper<LayoutNode, ParentConnectorDirection>
- the IMapper<K, V> that is used for storing the direction specifiers of the child nodes
Implemented in
BusSubtreePlacer.determineChildConnectors, CompactSubtreePlacer.determineChildConnectors, MultiSplitSubtreePlacer.determineChildConnectors, SingleSplitSubtreePlacer.determineChildConnectors, AspectRatioSubtreePlacer.determineChildConnectors, AssistantSubtreePlacer.determineChildConnectors, DendrogramSubtreePlacer.determineChildConnectors, DoubleLayerSubtreePlacer.determineChildConnectors, FixedSubtreePlacer.determineChildConnectors, LeftRightSubtreePlacer.determineChildConnectors, LevelAlignedSubtreePlacer.determineChildConnectors, MultiLayerSubtreePlacer.determineChildConnectors, SingleLayerSubtreePlacer.determineChildConnectorsArranges the SubtreeShapes of the local root and its children and routes the edges that connect them.
Arranges the SubtreeShapes of the local root and its children and routes the edges that connect them.
This method is the main method of the tree layout algorithm. It is called by TreeLayout in each recursion step to place the local root in relation to its children. Their shapes will be merged into one SubtreeShape, which is returned by this method.
The SubtreeShape for the local root can be obtained from the nodeShapeProvider. subtreeShapeProvider contains the SubtreeShapes assigned to the child nodes.
Due to the order in which the tree nodes are processed, it is guaranteed that at the time of the invocation of this method the SubtreeShape of every descendant node has already been calculated.
abstract
Parameters
- nodeShapeProvider: IMapper<LayoutNode, SubtreeShape>
- the IMapper<K, V> for obtaining an initial shape of the root node
- subtreeShapeProvider: IMapper<LayoutNode, SubtreeShape>
- the IMapper<K, V> for accessing the pre-calculated shapes of the subtrees
- graph: LayoutGraph
- the input graph
- localRoot: LayoutNode
- the root of the subtree that should be arranged by this method
- parentConnectorDirection: ParentConnectorDirection
- the direction specifier for the connector of the local root node to its parent node
Return Value
- SubtreeShape
- the combined shape of the whole subtree