Search this API

y.layout.tree
Class DoubleLinePlacer

java.lang.Object
  extended by y.layout.tree.AbstractRotatableNodePlacer
      extended by y.layout.tree.DoubleLinePlacer
All Implemented Interfaces:
FromSketchNodePlacer, NodePlacer

public class DoubleLinePlacer
extends AbstractRotatableNodePlacer

The DoubleLinePlacer is a special node placer that places its children in two lines.
This node placer is especially useful for leaves with great width.


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
DoubleLinePlacer()
          Creates a new DoubleLinePlacer with the default modification matrix.
DoubleLinePlacer(AbstractRotatableNodePlacer.Matrix modificationMatrix)
          Creates a new DoubleLinePlacer with the given modification matrix.
 
Method Summary
protected  byte determineChildConnector(Node child)
          Returns NodePlacer.DIRECTION_NORTH
 AbstractRotatableNodePlacer.RootAlignment getRootAlignment()
          Returns the horizontal alignment that is used for the root node.
protected  y.layout.tree.SubtreeShapeRotated placeSubtree(Node localRoot, byte parentConnectorDirection)
          Places the subtree in two lines.
 void setRootAlignment(AbstractRotatableNodePlacer.RootAlignment rootAlignment)
          Specifies the horizontal alignment that is used for the root node.
 
Methods inherited from class y.layout.tree.AbstractRotatableNodePlacer
createComparator, createFromSketchComparator, createProcessor, 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
 

Constructor Detail

DoubleLinePlacer

public DoubleLinePlacer()
Creates a new DoubleLinePlacer with the default modification matrix.


DoubleLinePlacer

public DoubleLinePlacer(AbstractRotatableNodePlacer.Matrix modificationMatrix)
Creates a new DoubleLinePlacer with the given modification matrix.

Parameters:
modificationMatrix -
Method Detail

determineChildConnector

protected byte determineChildConnector(Node child)
Returns NodePlacer.DIRECTION_NORTH

Specified by:
determineChildConnector in class AbstractRotatableNodePlacer
Parameters:
child -
Returns:
NodePlacer.DIRECTION_NORTH

placeSubtree

protected y.layout.tree.SubtreeShapeRotated placeSubtree(Node localRoot,
                                                         byte parentConnectorDirection)
Places the subtree in two lines.

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

getRootAlignment

public AbstractRotatableNodePlacer.RootAlignment getRootAlignment()
Returns the horizontal alignment that is used for the root node.

Returns:
the horizontal alignment that is used for the root node.

setRootAlignment

public void setRootAlignment(AbstractRotatableNodePlacer.RootAlignment rootAlignment)
Specifies the horizontal alignment that is used for the root node.

Parameters:
rootAlignment - used for the root node.

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