double radialSep = Math.max(maxDiagonalInTree(tree),
CoSELayout.DEFAULT_RADIAL_SEPARATION);
CoSELayout.branchRadialLayout(centerNode, null, 0, 359, 0, radialSep);
Rectangle bounds = LGraph.calculateBounds(tree);
ChsTransform chsTransform = new ChsTransform();
chsTransform.setDeviceOrgX(bounds.getLeft().x);
chsTransform.setDeviceOrgY(bounds.getTop().y);
chsTransform.setWorldOrgX(startingPoint.x);
chsTransform.setWorldOrgY(startingPoint.y);
for (int i = 0; i < tree.size(); i++)
{
LNode node = tree.get(i);
node.transform(chsTransform);
}
PrecisionPoint bottomRight =
new PrecisionPoint(bounds.getBottomRight());
return chsTransform.inverseTransformPoint(bottomRight);
}