org.graffiti.plugins.algorithms.reingoldtilford
Class BottomCenterToTopCenterEdgeLayoutStrategy

java.lang.Object
  extended by org.graffiti.plugins.algorithms.reingoldtilford.BottomCenterToTopCenterEdgeLayoutStrategy
All Implemented Interfaces:
EdgeLayoutStrategy

public class BottomCenterToTopCenterEdgeLayoutStrategy
extends Object
implements EdgeLayoutStrategy

Lays the edges so that each edge leaves the parent at the center of the bottom side and enters the child at the center of the top side.

Version:
$Revision$ $Date$
Author:
Andreas Gleißner
See Also:
EdgeLayout.BOTTOM_CENTER_TO_TOP_CENTER

Constructor Summary
BottomCenterToTopCenterEdgeLayoutStrategy()
           
 
Method Summary
 void calculateContours(Tree tree, ReingoldTilfordAlgorithm algorithm)
          Creates and sets the contours of tree.
static BottomCenterToTopCenterEdgeLayoutStrategy getSingleton()
          Returns the single BottomCenterToTopCenterEdgeLayoutStrategy object.
 void layEdges(Tree tree, double xOrigin, double yOrigin, ReingoldTilfordAlgorithm algorithm)
          Sets the ports and bends for the edges connecting the root node of tree with its subtrees.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BottomCenterToTopCenterEdgeLayoutStrategy

public BottomCenterToTopCenterEdgeLayoutStrategy()
Method Detail

getSingleton

public static BottomCenterToTopCenterEdgeLayoutStrategy getSingleton()
Returns the single BottomCenterToTopCenterEdgeLayoutStrategy object.

Returns:
the single BottomCenterToTopCenterEdgeLayoutStrategy object.

calculateContours

public void calculateContours(Tree tree,
                              ReingoldTilfordAlgorithm algorithm)
Creates and sets the contours of tree.
Preconditions:
tree must contain at least 1 child.
The children of tree have been combined.

Specified by:
calculateContours in interface EdgeLayoutStrategy
Parameters:
tree - the tree whose contours are set.
algorithm - the Reingold-Tilford algorithm.
See Also:
EdgeLayout.calculateContours(Tree, ReingoldTilfordAlgorithm)

layEdges

public void layEdges(Tree tree,
                     double xOrigin,
                     double yOrigin,
                     ReingoldTilfordAlgorithm algorithm)
Sets the ports and bends for the edges connecting the root node of tree with its subtrees. Implementing methods must not directly query or set coordinates but rather use the methods ReingoldTilfordAlgorithm.createPort(String, double, double) and ReingoldTilfordAlgorithm.createCoordinateAttribute(String, double, double) .

Specified by:
layEdges in interface EdgeLayoutStrategy
Parameters:
tree - the tree layout whose edges are layed out.
xOrigin - the absolute x-coordinate of tree within the coordinate system of Gravisto.
yOrigin - the absolute x-coordinate of tree within the coordinate system of Gravisto.
algorithm - the Reingold-Tilford algorithm.
See Also:
Orientation, EdgeLayout.layEdges(Tree, double, double, ReingoldTilfordAlgorithm)


Generated at 2012-05-30 11:01:25 PM CEST