y.layout.tree
Class BusPlacer
java.lang.Object
y.layout.tree.AbstractRotatableNodePlacer
y.layout.tree.BusPlacer
- All Implemented Interfaces:
- NodePlacer
public class BusPlacer
- extends AbstractRotatableNodePlacer
The BusPlacer is a special NodePlacer that creates a bus where all child nodes and the root node
are connected to.
The BusPlacer is rotatable using the constructor BusPlacer(AbstractRotatableNodePlacer.Matrix).
-
-
| Methods inherited from class y.layout.tree.AbstractRotatableNodePlacer |
createProcessor, createRootNodeShape, createSubtreeShape, 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 |
BusPlacer
public BusPlacer()
- Initializes a new instance with the Default matrix.
BusPlacer
public BusPlacer(AbstractRotatableNodePlacer.Matrix modificationMatrix)
- Initializes a new BusPlacer with the given modification matrix.
- Parameters:
modificationMatrix -
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_SOUTH
determineChildConnectors
public void determineChildConnectors(Node localRoot,
DataMap connectorMap)
- This method initializes internal data structures, then uses the abstract method
determineChildConnector(y.base.Node)
to determine the child node connector directions.
- Specified by:
determineChildConnectors in interface NodePlacer- Overrides:
determineChildConnectors in class AbstractRotatableNodePlacer
- Parameters:
localRoot - the local root nodeconnectorMap - the map that will be used to store the values- See Also:
determineChildConnector(y.base.Node)
placeSubtree
protected y.layout.tree.SubtreeShapeRotated placeSubtree(Node localRoot,
byte parentConnectorDirection)
- Places the root node and its children
- Specified by:
placeSubtree in class AbstractRotatableNodePlacer
- Parameters:
localRoot - parentConnectorDirection -
- Returns:
- the created subtree shape
createComparator
public Comparator createComparator()
- Overrides:
createComparator in class AbstractRotatableNodePlacer