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
我。 任何人都可以帮助我吗?我该如何解决这个问题?