y.layout.tree
Class FreePlacer
java.lang.Object
y.layout.tree.AbstractRotatableNodePlacer
y.layout.tree.FreePlacer
- All Implemented Interfaces:
- FromSketchNodePlacer, NodePlacer
public class FreePlacer
- extends AbstractRotatableNodePlacer
Placer that can be used as simple "pseudo"-placer. May be useful if the localRoot does not have any children
or you want to place them manually.
Constructor Summary |
FreePlacer()
Creates a new instance with the default matrix. |
Methods inherited from class y.layout.tree.AbstractRotatableNodePlacer |
createComparator, createFromSketchComparator, createRootNodeShape, createSubtreeShape, determineChildConnectors, getModificationMatrix, getPortConstraint, getSourcePointAbs, getSpacing, placeSubtree, setSpacing, translateDirectionToModel, translateDirectionToReal, translatePoint |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FreePlacer
public FreePlacer()
- Creates a new instance with the default matrix.
determineChildConnector
protected byte determineChildConnector(Node child)
- Description copied from class:
AbstractRotatableNodePlacer
- This method must be implemented by subclasses. It is used to assigns a connector shape direction to each child.
- Specified by:
determineChildConnector
in class AbstractRotatableNodePlacer
- Parameters:
child
-
- Returns:
NodePlacer.DIRECTION_NONE
placeSubtree
protected y.layout.tree.SubtreeShapeRotated placeSubtree(Node localRoot,
byte parentConnectorDirection)
- Creates the subtree shape
- Specified by:
placeSubtree
in class AbstractRotatableNodePlacer
- Parameters:
localRoot
- parentConnectorDirection
-
- Returns:
- the created subtree shape
createProcessor
public Processor createProcessor(GenericTreeLayouter layouter,
LayoutGraph graph,
Node currentRoot)
- Creates a processor suitable to the FreePlacer.
This processor will change all descendants node placers to FreePlacer.
- Specified by:
createProcessor
in interface NodePlacer
- Overrides:
createProcessor
in class AbstractRotatableNodePlacer
- Parameters:
layouter
- graph
- currentRoot
-
- Returns:
- a Processor or null