public class FreeNodePlacer extends AbstractRotatableNodePlacer
FreeNodePlacer
is a simple pseudo-placer.
The children of local root nodes are not moved. The INodePlacer
just merges their rotated shapes and routes the
edges.
This INodePlacer
may be useful if a local root node does not have any children or you want to place them
manually.
AbstractRotatableNodePlacer.Matrix, AbstractRotatableNodePlacer.RootAlignment
createdChildren, graph, nodeShapeProvider, subtreeShapeProvider
Constructor and Description |
---|
FreeNodePlacer()
Creates a new instance of
FreeNodePlacer with default settings. |
Modifier and Type | Method and Description |
---|---|
IProcessor |
createProcessor(TreeLayout layouter,
LayoutGraph graph,
Node currentRoot)
|
protected ParentConnectorDirection |
determineChildConnector(Node child)
Determines a connector direction for the given child node.
|
protected RotatedSubtreeShape |
placeSubtree(Node localRoot,
ParentConnectorDirection parentConnectorDirection)
Merges the rotated shapes of the given local root and its children and routes the edges between them.
|
createComparator, createFromSketchComparator, determineChildConnectors, getModificationMatrix, getNodeShape, getPortConstraint, getSourcePointAbs, getSpacing, getSubtreeShape, placeSubtree, setSpacing, translateDirectionToModel, translateDirectionToReal, translatePoint
public FreeNodePlacer()
FreeNodePlacer
with default settings.public IProcessor createProcessor(TreeLayout layouter, LayoutGraph graph, Node currentRoot)
createProcessor
in interface INodePlacer
createProcessor
in class AbstractRotatableNodePlacer
layouter
- the current TreeLayout
instancegraph
- the input graphcurrentRoot
- the current root node handled by this INodePlacer
IProcessor
suitable for FreeNodePlacer
protected ParentConnectorDirection determineChildConnector(Node child)
This implementation returns ParentConnectorDirection.NONE
for every node.
determineChildConnector
in class AbstractRotatableNodePlacer
child
- the child nodeParentConnectorDirection.NONE
protected RotatedSubtreeShape placeSubtree(Node localRoot, ParentConnectorDirection parentConnectorDirection)
placeSubtree
in class AbstractRotatableNodePlacer
localRoot
- the local root nodeparentConnectorDirection
- the direction specifier for the connector of the local root node to its parent node