Search this API

y.layout.hierarchic
Class TreeDrawer.HierarchicTreePlacer

java.lang.Object
  extended by y.layout.tree.AbstractNodePlacer
      extended by y.layout.hierarchic.TreeDrawer.HierarchicTreePlacer
All Implemented Interfaces:
Cloneable, NodePlacer
Enclosing class:
TreeDrawer

public static class TreeDrawer.HierarchicTreePlacer
extends AbstractNodePlacer

places nodes in their given layers (does not change the y coordinates) for the TREE layout style of a HierarchicLayouter.


Field Summary
 
Fields inherited from class y.layout.tree.AbstractNodePlacer
graph
 
Fields inherited from interface y.layout.tree.NodePlacer
DIRECTION_ANY, DIRECTION_EAST, DIRECTION_NONE, DIRECTION_NORTH, DIRECTION_SOUTH, DIRECTION_WEST
 
Constructor Summary
TreeDrawer.HierarchicTreePlacer(double minimalNodeDistance)
          creates a new HierarchicTreePlacer.
 
Method Summary
protected  byte determineChildConnector(Node child)
          This method must be implemented by subclasses.
protected  GenericTreeLayouter.SubtreeShape placeSubtree(Node localRoot, byte parentConnectorDirection)
          The main placeSubtree method that must be implemented by subclasses.
 
Methods inherited from class y.layout.tree.AbstractNodePlacer
clone, createProcessor, determineChildConnectors, getNodeShape, getSubtreeShape, placeSubtree
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeDrawer.HierarchicTreePlacer

public TreeDrawer.HierarchicTreePlacer(double minimalNodeDistance)
creates a new HierarchicTreePlacer.

Parameters:
minimalNodeDistance - the minimal allowed distance between two nodes in the same layer
Method Detail

determineChildConnector

protected byte determineChildConnector(Node child)
Description copied from class: AbstractNodePlacer
This method must be implemented by subclasses. It assigns a connector shape direction to each child.

Specified by:
determineChildConnector in class AbstractNodePlacer
Parameters:
child - the child node
Returns:
a byte constant as defined in the NodePlacer interface

placeSubtree

protected GenericTreeLayouter.SubtreeShape placeSubtree(Node localRoot,
                                                        byte parentConnectorDirection)
Description copied from class: AbstractNodePlacer
The main placeSubtree method that must be implemented by subclasses.

Specified by:
placeSubtree in class AbstractNodePlacer
Parameters:
localRoot - the local root node
parentConnectorDirection - the direction of the connector shape
Returns:
a SubtreeShape instance that describes the shape of the whole subtree

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