// This sample demonstrates how to // apply tree layout to the diagram // Create the layout object TreeLayout layout = new TreeLayout(); // Adjust the layout attributes layout.setLinkStyle(TreeLayoutLinkType.Rounded); layout.setKeepRootPosition(true); layout.setLevelDistance(50); // Perform the actual arrangement layout.arrange(diagram); |