org.graffiti.plugins.algorithms.reingoldtilford
Class AllPermutationsChildOrderStrategy

java.lang.Object
  extended by org.graffiti.plugins.algorithms.reingoldtilford.AllPermutationsChildOrderStrategy
All Implemented Interfaces:
ChildOrderStrategy

public class AllPermutationsChildOrderStrategy
extends Object
implements ChildOrderStrategy

Tries all possible permutations of children to minimize the width of the tree layout.

Version:
$Revision$ $Date$
Author:
Andreas Gleißner
See Also:
ChildOrderPolicy.ALL_PERMUTATIONS

Method Summary
 void combineChildren(Tree tree, ReingoldTilfordAlgorithm algorithm)
          Combines the tree layouts of the children of parent.
static AllPermutationsChildOrderStrategy getSingleton()
          Returns the single AllPermutationsChildOrderStrategy object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSingleton

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

Returns:
the single AllPermutationsChildOrderStrategy object.

combineChildren

public void combineChildren(Tree tree,
                            ReingoldTilfordAlgorithm algorithm)
Combines the tree layouts of the children of parent.

Preconditions:
parent.getChildren().size() > 1

Specified by:
combineChildren in interface ChildOrderStrategy
Parameters:
tree - the Tree whose children are to be combined.
algorithm - the Reingold-Tilford-Algorithm.
See Also:
ChildOrderPolicy.combineChildren(Tree, ReingoldTilfordAlgorithm)


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