public class LeafNodePlacer extends Object implements INodePlacer
LeafNodePlacer creates a SubtreeShape for a leaf node and routes its incoming
edge at the target side.| Constructor and Description |
|---|
LeafNodePlacer()
Creates a new
LeafNodePlacer instance with default settings. |
| Modifier and Type | Method and Description |
|---|---|
IProcessor |
createProcessor(TreeLayout layouter,
LayoutGraph graph,
Node currentRoot)
Creates an optional
IProcessor for pre- and post-processing. |
void |
determineChildConnectors(Node localRoot,
IDataMap connectorMap)
Does nothing because leaf nodes don't have children so there are no child connectors.
|
TreeLayout.SubtreeShape |
placeSubtree(IDataProvider nodeShapeProvider,
IDataProvider subtreeShapeProvider,
LayoutGraph graph,
Node localRoot,
ParentConnectorDirection parentConnectorDirection)
Creates a
TreeLayout.SubtreeShape for the local root node (a leaf node in this case) and adds target points to
the incoming edge. |
public LeafNodePlacer()
LeafNodePlacer instance with default settings.public IProcessor createProcessor(TreeLayout layouter, LayoutGraph graph, Node currentRoot)
IProcessor for pre- and post-processing.
This implementation returns null. Hence, no pre- or post-processing is done.
createProcessor in interface INodePlacerlayouter - the current TreeLayout instancegraph - the input graphcurrentRoot - the root node handled by this INodePlacernullpublic void determineChildConnectors(Node localRoot, IDataMap connectorMap)
determineChildConnectors in interface INodePlacerlocalRoot - the local root nodeconnectorMap - the map that must be used for storing the direction specifiers of the child nodespublic TreeLayout.SubtreeShape placeSubtree(IDataProvider nodeShapeProvider, IDataProvider subtreeShapeProvider, LayoutGraph graph, Node localRoot, ParentConnectorDirection parentConnectorDirection)
TreeLayout.SubtreeShape for the local root node (a leaf node in this case) and adds target points to
the incoming edge.
The incoming edge is routed according to possibly assigned PortConstraints.
placeSubtree in interface INodePlacernodeShapeProvider - the IDataProvider for obtaining an initial shape of the root nodesubtreeShapeProvider - the IDataProvider for accessing the pre-calculated shapes of the subtreesgraph - the input graphlocalRoot - the root of the subtree that should be arranged by this methodparentConnectorDirection - the direction specifier for the connector of the local root node to its parent nodeTreeLayout.SubtreeShape of the leaf node including the connector