I

ISubtreePlacer

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.
Provides the direction of the connector to the SubtreeShape for each child node.
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