protected void setRootPolars() { List<V> roots = TreeUtils.getRoots(graph); if(roots.size() == 1) { // its a Tree V root = roots.get(0); setRootPolar(root); setPolars(new ArrayList<V>(graph.getChildren(root)), getCenter(), getSize().width/2); } else if (roots.size() > 1) { // its a Forest setPolars(roots, getCenter(), getSize().width/2); } }
protected void setRootPolars() { List<V> roots = TreeUtils.getRoots(graph); if(roots.size() == 1) { // its a Tree V root = roots.get(0); setRootPolar(root); setPolars(new ArrayList<V>(graph.getChildren(root)), getCenter(), getSize().width/2); } else if (roots.size() > 1) { // its a Forest setPolars(roots, getCenter(), getSize().width/2); } }