1
사용자가 클릭 할 때 정점의 모든 자식을 축소하려고합니다.노드 선택에 따라 jung 노드 축소
Tree must not contain [email protected]
코드는 아래와 같습니다 :
public void graphClicked(MyNode v, MouseEvent me)
{
Collection<MyNode> childrens = graph.getChildren(v);
Collection picked = new Hashset(childrens);
if(picked.size>1)
{
Graph ingraph = this.radialLayout.getGraph();
Graph clusterGraph = collapser.getClusterGraph(graph,childrens);
Graph g = collapser.collapse(ingraph,clustergraph); //The error report points on this line
.
.
.
}
}
나는 Forest
RadialLayout
로 사용하고 그러나 문제는 내가 시도 할 때마다 그렇게하는 것입니다, 나는 다음과 같은 오류가 발생했습니다. 아무도 도와 줄 수 있습니까? 문제를 어떻게 해결할 수 있습니까? 여기에 트리 노드의 붕괴와 정점 붕괴 데모 밖으로