// Path: org.abego.treelayout/src/main/java/org/abego/treelayout/util/DefaultConfiguration.java
// public class DefaultConfiguration<TreeNode> implements
// 		Configuration<TreeNode> {
// 
// 	/**
// 	 * Specifies the constants to be used for this Configuration.
// 	 * 
// 	 * @param gapBetweenLevels &nbsp;
// 	 * @param gapBetweenNodes &nbsp;
// 	 * @param location
// 	 *            [default: {@link org.abego.treelayout.Configuration.Location#Top Top}]
// 	 * @param alignmentInLevel
// 	 *            [default: {@link org.abego.treelayout.Configuration.AlignmentInLevel#Center Center}]
// 	 */
// 	public DefaultConfiguration(double gapBetweenLevels,
// 			double gapBetweenNodes, Location location,
// 			AlignmentInLevel alignmentInLevel) {
// 		checkArg(gapBetweenLevels >= 0, "gapBetweenLevels must be >= 0");
// 		checkArg(gapBetweenNodes >= 0, "gapBetweenNodes must be >= 0");
// 
// 		this.gapBetweenLevels = gapBetweenLevels;
// 		this.gapBetweenNodes = gapBetweenNodes;
// 		this.location = location;
// 		this.alignmentInLevel = alignmentInLevel;
// 	}
// 
// 	/**
// 	 * Convenience constructor, using a default for the alignmentInLevel.
// 	 * <p>
// 	 * see
// 	 * {@link #DefaultConfiguration(double, double, org.abego.treelayout.Configuration.Location, org.abego.treelayout.Configuration.AlignmentInLevel)}
// 	 * </p>
//      * @param gapBetweenLevels &nbsp;
//      * @param gapBetweenNodes &nbsp;
//      * @param location &nbsp;
// 	 */
// 	public DefaultConfiguration(double gapBetweenLevels,
// 			double gapBetweenNodes, Location location) {
// 		this(gapBetweenLevels, gapBetweenNodes, location,
// 				AlignmentInLevel.Center);
// 	}
// 
// 	/**
// 	 * Convenience constructor, using a default for the rootLocation and the
// 	 * alignmentInLevel.
// 	 * <p>
// 	 * see
// 	 * {@link #DefaultConfiguration(double, double,  org.abego.treelayout.Configuration.Location, org.abego.treelayout.Configuration.AlignmentInLevel)}
// 	 * </p>
//      * @param gapBetweenLevels &nbsp;
//      * @param gapBetweenNodes &nbsp;
// 	 */
// 	public DefaultConfiguration(double gapBetweenLevels,
// 			double gapBetweenNodes) {
// 		this(gapBetweenLevels, gapBetweenNodes, Location.Top,
// 				AlignmentInLevel.Center);
// 	}
// 
// 	// -----------------------------------------------------------------------
// 	// gapBetweenLevels
// 
// 	private final double gapBetweenLevels;
// 
// 	@Override
// 	public double getGapBetweenLevels(int nextLevel) {
// 		return gapBetweenLevels;
// 	}
// 
// 	// -----------------------------------------------------------------------
// 	// gapBetweenNodes
// 
// 	private final double gapBetweenNodes;
// 
// 	@Override
// 	public double getGapBetweenNodes(TreeNode node1, TreeNode node2) {
// 		return gapBetweenNodes;
// 	}
// 
// 	// -----------------------------------------------------------------------
// 	// location
// 
// 	private final Location location;
// 
// 	@Override
// 	public Location getRootLocation() {
// 		return location;
// 	}
// 
// 	// -----------------------------------------------------------------------
// 	// alignmentInLevel
// 
// 	private AlignmentInLevel alignmentInLevel;
// 
// 	@Override
// 	public AlignmentInLevel getAlignmentInLevel() {
// 		return alignmentInLevel;
// 	}
// 
// }
// 
// Path: org.abego.treelayout/src/main/java/org/abego/treelayout/util/FixedNodeExtentProvider.java
// public class FixedNodeExtentProvider<T> implements NodeExtentProvider<T> {
// 
// 	private final double width;
// 	private final double height;
// 
// 	/**
// 	 * Specifies the constants to be used as the width and height of the nodes.
// 	 * 
// 	 * @param width
// 	 *            [default=0]
// 	 * 
// 	 * @param height
// 	 *            [default=0]
// 	 */
// 	public FixedNodeExtentProvider(double width, double height) {
// 		checkArg(width >= 0, "width must be >= 0");
// 		checkArg(height >= 0, "height must be >= 0");
// 
// 		this.width = width;
// 		this.height = height;
// 	}
// 
// 	/**
// 	 * see {@link #FixedNodeExtentProvider(double, double)}
// 	 */
// 	public FixedNodeExtentProvider() {
// 		this(0, 0);
// 	}
// 
// 	@Override
// 	public double getWidth(T treeNode) {
// 		return width;
// 	}
// 
// 	@Override
// 	public double getHeight(T treeNode) {
// 		return height;
// 	}
// 
// }


import org.abego.treelayout.util.DefaultConfiguration;
import org.abego.treelayout.util.FixedNodeExtentProvider;
import java.util.Random;
		while (remainingNodesCount > 0) {
			int n = random.nextInt(remainingNodesCount) + 1;
			result.addChild(createRandomTree(n, maxChildrenCount, random));
			remainingNodesCount -= n;
			i++;
			if (i >= (childrenCount - 1) && remainingNodesCount > 0) {
				result.addChild(createRandomTree(remainingNodesCount,
						maxChildrenCount, random));
				remainingNodesCount = 0;
			}
		}
		return result;
	}

	/**
	 * 
	 * @param n
	 * @return the number of milliseconds to create the tree layout (Time for
	 *         creating the tree not included)
	 */
	private static long layoutRandomTree(int n, int maxChildrenCount,
			Random random) {
		StringTreeNode root = createRandomTree(n, maxChildrenCount, random);

		StringTreeAsTreeForTreeLayout treeForTreeLayout = new StringTreeAsTreeForTreeLayout(
				root);

		long start = System.currentTimeMillis();
		new TreeLayout<StringTreeNode>(treeForTreeLayout,
				new FixedNodeExtentProvider<StringTreeNode>(60, 20),
// Path: org.abego.treelayout/src/main/java/org/abego/treelayout/util/DefaultConfiguration.java
// public class DefaultConfiguration<TreeNode> implements
// 		Configuration<TreeNode> {
// 
// 	/**
// 	 * Specifies the constants to be used for this Configuration.
// 	 * 
// 	 * @param gapBetweenLevels &nbsp;
// 	 * @param gapBetweenNodes &nbsp;
// 	 * @param location
// 	 *            [default: {@link org.abego.treelayout.Configuration.Location#Top Top}]
// 	 * @param alignmentInLevel
// 	 *            [default: {@link org.abego.treelayout.Configuration.AlignmentInLevel#Center Center}]
// 	 */
// 	public DefaultConfiguration(double gapBetweenLevels,
// 			double gapBetweenNodes, Location location,
// 			AlignmentInLevel alignmentInLevel) {
// 		checkArg(gapBetweenLevels >= 0, "gapBetweenLevels must be >= 0");
// 		checkArg(gapBetweenNodes >= 0, "gapBetweenNodes must be >= 0");
// 
// 		this.gapBetweenLevels = gapBetweenLevels;
// 		this.gapBetweenNodes = gapBetweenNodes;
// 		this.location = location;
// 		this.alignmentInLevel = alignmentInLevel;
// 	}
// 
// 	/**
// 	 * Convenience constructor, using a default for the alignmentInLevel.
// 	 * <p>
// 	 * see
// 	 * {@link #DefaultConfiguration(double, double, org.abego.treelayout.Configuration.Location, org.abego.treelayout.Configuration.AlignmentInLevel)}
// 	 * </p>
//      * @param gapBetweenLevels &nbsp;
//      * @param gapBetweenNodes &nbsp;
//      * @param location &nbsp;
// 	 */
// 	public DefaultConfiguration(double gapBetweenLevels,
// 			double gapBetweenNodes, Location location) {
// 		this(gapBetweenLevels, gapBetweenNodes, location,
// 				AlignmentInLevel.Center);
// 	}
// 
// 	/**
// 	 * Convenience constructor, using a default for the rootLocation and the
// 	 * alignmentInLevel.
// 	 * <p>
// 	 * see
// 	 * {@link #DefaultConfiguration(double, double,  org.abego.treelayout.Configuration.Location, org.abego.treelayout.Configuration.AlignmentInLevel)}
// 	 * </p>
//      * @param gapBetweenLevels &nbsp;
//      * @param gapBetweenNodes &nbsp;
// 	 */
// 	public DefaultConfiguration(double gapBetweenLevels,
// 			double gapBetweenNodes) {
// 		this(gapBetweenLevels, gapBetweenNodes, Location.Top,
// 				AlignmentInLevel.Center);
// 	}
// 
// 	// -----------------------------------------------------------------------
// 	// gapBetweenLevels
// 
// 	private final double gapBetweenLevels;
// 
// 	@Override
// 	public double getGapBetweenLevels(int nextLevel) {
// 		return gapBetweenLevels;
// 	}
// 
// 	// -----------------------------------------------------------------------
// 	// gapBetweenNodes
// 
// 	private final double gapBetweenNodes;
// 
// 	@Override
// 	public double getGapBetweenNodes(TreeNode node1, TreeNode node2) {
// 		return gapBetweenNodes;
// 	}
// 
// 	// -----------------------------------------------------------------------
// 	// location
// 
// 	private final Location location;
// 
// 	@Override
// 	public Location getRootLocation() {
// 		return location;
// 	}
// 
// 	// -----------------------------------------------------------------------
// 	// alignmentInLevel
// 
// 	private AlignmentInLevel alignmentInLevel;
// 
// 	@Override
// 	public AlignmentInLevel getAlignmentInLevel() {
// 		return alignmentInLevel;
// 	}
// 
// }
// 
// Path: org.abego.treelayout/src/main/java/org/abego/treelayout/util/FixedNodeExtentProvider.java
// public class FixedNodeExtentProvider<T> implements NodeExtentProvider<T> {
// 
// 	private final double width;
// 	private final double height;
// 
// 	/**
// 	 * Specifies the constants to be used as the width and height of the nodes.
// 	 * 
// 	 * @param width
// 	 *            [default=0]
// 	 * 
// 	 * @param height
// 	 *            [default=0]
// 	 */
// 	public FixedNodeExtentProvider(double width, double height) {
// 		checkArg(width >= 0, "width must be >= 0");
// 		checkArg(height >= 0, "height must be >= 0");
// 
// 		this.width = width;
// 		this.height = height;
// 	}
// 
// 	/**
// 	 * see {@link #FixedNodeExtentProvider(double, double)}
// 	 */
// 	public FixedNodeExtentProvider() {
// 		this(0, 0);
// 	}
// 
// 	@Override
// 	public double getWidth(T treeNode) {
// 		return width;
// 	}
// 
// 	@Override
// 	public double getHeight(T treeNode) {
// 		return height;
// 	}
// 
// }


// Path: org.abego.treelayout/src/test/java/org/abego/treelayout/TreeLayoutPerformanceReport.java
import org.abego.treelayout.util.DefaultConfiguration;
import org.abego.treelayout.util.FixedNodeExtentProvider;
import java.util.Random;

		while (remainingNodesCount > 0) {
			int n = random.nextInt(remainingNodesCount) + 1;
			result.addChild(createRandomTree(n, maxChildrenCount, random));
			remainingNodesCount -= n;
			i++;
			if (i >= (childrenCount - 1) && remainingNodesCount > 0) {
				result.addChild(createRandomTree(remainingNodesCount,
						maxChildrenCount, random));
				remainingNodesCount = 0;
			}
		}
		return result;
	}

	/**
	 * 
	 * @param n
	 * @return the number of milliseconds to create the tree layout (Time for
	 *         creating the tree not included)
	 */
	private static long layoutRandomTree(int n, int maxChildrenCount,
			Random random) {
		StringTreeNode root = createRandomTree(n, maxChildrenCount, random);

		StringTreeAsTreeForTreeLayout treeForTreeLayout = new StringTreeAsTreeForTreeLayout(
				root);

		long start = System.currentTimeMillis();
		new TreeLayout<StringTreeNode>(treeForTreeLayout,
				new FixedNodeExtentProvider<StringTreeNode>(60, 20),
				new DefaultConfiguration<StringTreeNode>(10, 10));