org.graffiti.plugins.algorithms.reingoldtilford
Class BusEdgeLayoutStrategy
java.lang.Object
org.graffiti.plugins.algorithms.reingoldtilford.BusEdgeLayoutStrategy
- All Implemented Interfaces:
- EdgeLayoutStrategy
public class BusEdgeLayoutStrategy
- extends Object
- implements EdgeLayoutStrategy
Lays the edges reminiscent of a bus layout.
- Version:
- $Revision$ $Date$
- Author:
- Andreas Gleißner
- See Also:
EdgeLayout.BUS
BusEdgeLayoutStrategy
public BusEdgeLayoutStrategy()
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