y.layout.tree
Class LeftRightPlacer

java.lang.Object
  extended by y.layout.tree.AbstractRotatableNodePlacer
      extended by y.layout.tree.LeftRightPlacer
All Implemented Interfaces:
NodePlacer

public class LeftRightPlacer
extends AbstractRotatableNodePlacer

The LeftRightPlacer is a NodePlacer that arranges the Nodes on the left and right side of a vertical bus.

 

Nested Class Summary
 
Nested classes/interfaces inherited from class y.layout.tree.AbstractRotatableNodePlacer
AbstractRotatableNodePlacer.Matrix, AbstractRotatableNodePlacer.RootAlignment
 
Field Summary
 
Fields inherited from class y.layout.tree.AbstractRotatableNodePlacer
createdChildren, graph, modificationMatrix, nodeShapeProvider, spacing, subtreeShapeProvider
 
Fields inherited from interface y.layout.tree.NodePlacer
DIRECTION_ANY, DIRECTION_EAST, DIRECTION_NONE, DIRECTION_NORTH, DIRECTION_SOUTH, DIRECTION_WEST
 
Constructor Summary
LeftRightPlacer()
          Creates a LeftRightPlacer with the default modificationMatrix
LeftRightPlacer(AbstractRotatableNodePlacer.Matrix modificationMatrix)
          Creates a LeftRightPlacer with the given modificationMatrix
 
Method Summary
 Comparator createComparator()
          Returns null because no comparator exists for the node placer.
protected  byte determineChildConnector(Node child)
          This method must be implemented by subclasses.
 void determineChildConnectors(Node localRoot, DataMap connectorMap)
          Determines the direction the children should place their connectors.
 boolean isPlaceLastOnBottom()
          Whether the last child is placed at the bottom of the other.
protected  y.layout.tree.SubtreeShapeRotated placeSubtree(Node localRoot, byte parentConnectorDirection)
          Places the shapes of the children on the left and right side of a vertical bus.
 void setPlaceLastOnBottom(boolean placeLastOnBottom)
          Sets whether the last child is placed at the bottom of the other.
 
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
 

Constructor Detail

LeftRightPlacer

public LeftRightPlacer()
Creates a LeftRightPlacer with the default modificationMatrix


LeftRightPlacer

public LeftRightPlacer(AbstractRotatableNodePlacer.Matrix modificationMatrix)
Creates a LeftRightPlacer with the given modificationMatrix

Parameters:
modificationMatrix -
Method Detail

determineChildConnectors

public void determineChildConnectors(Node localRoot,
                                     DataMap connectorMap)
Determines the direction the children should place their connectors.

Specified by:
determineChildConnectors in interface NodePlacer
Overrides:
determineChildConnectors in class AbstractRotatableNodePlacer
Parameters:
localRoot -
connectorMap -
See Also:
AbstractRotatableNodePlacer.determineChildConnector(Node)

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:
Should not be reached, throws IllegalStateException

placeSubtree

protected y.layout.tree.SubtreeShapeRotated placeSubtree(Node localRoot,
                                                         byte parentConnectorDirection)
Places the shapes of the children on the left and right side of a vertical bus.

Specified by:
placeSubtree in class AbstractRotatableNodePlacer
Parameters:
localRoot -
parentConnectorDirection -
Returns:
the new subtree shape

isPlaceLastOnBottom

public boolean isPlaceLastOnBottom()
Whether the last child is placed at the bottom of the other.

Returns:
whether the last child is placed at the bottom of the other.

setPlaceLastOnBottom

public void setPlaceLastOnBottom(boolean placeLastOnBottom)
Sets whether the last child is placed at the bottom of the other.

Parameters:
placeLastOnBottom - true if enabled, otherwise false

createComparator

public Comparator createComparator()
Returns null because no comparator exists for the node placer.

Overrides:
createComparator in class AbstractRotatableNodePlacer
Returns:
null

© Copyright 2000-2008,
yWorks GmbH.
All rights reserved.