@Override
    public void layout() {
        boundsLeft = Double.MAX_VALUE;
        boundsRight = Double.MIN_VALUE;
        boundsTop = Double.MAX_VALUE;
        boundsBottom = Double.MIN_VALUE;

        mod = new HashMap<>();
        thread = new HashMap<>();
        prelim = new HashMap<>();
        change = new HashMap<>();
        shift = new HashMap<>();
        ancestor = new HashMap<>();
        number = new HashMap<>();
        positions = new HashMap<>();

        nodeBounds = null;
        sizeOfLevel = new ArrayList<>();

        // No need to explicitly set mod, thread and ancestor as their getters
        // are taking care of the initial values. This avoids a full tree walk
        // through and saves some memory as no entries are added for
        // "initial values".

        if (tree != null) {
            final TreeNode r = tree.getRoot();
            firstWalk(r, null);
            calcSizeOfLevels(r, 0);
            secondWalk(r, -getPrelim(r), 0, 0);
        }
    }
Creates a TreeLayout for a given tree.
<p>
In addition to the tree the {@link NodeExtentProvider} and the
{@link Configuration} must be given.
stroom-core-client-widget/src/main/java/stroom/widget/htree/client/treelayout/AbegoTreeLayout.java