HierarchicalLayoutManager manager = new HierarchicalLayoutManager(HierarchicalLayoutManager.Combine.SAME_OUTPUTS);
manager.setMaxLayerLength(9);
manager.setMinLayerDifference(3);
m.setManager(manager);
m.setSubManager(new HierarchicalLayoutManager(HierarchicalLayoutManager.Combine.SAME_OUTPUTS));
m.doLayout(new LayoutGraph(edges, figures));
} else {
HierarchicalLayoutManager manager = new HierarchicalLayoutManager(HierarchicalLayoutManager.Combine.SAME_OUTPUTS);
manager.setMaxLayerLength(10);
manager.doLayout(new LayoutGraph(edges, figures));