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
我。 任何人都可以幫助我嗎?我該如何解決這個問題?