根据节点选择折叠一个荣格节点
|
当用户单击某个顶点时,我试图折叠该顶点的所有子代。但是问题是,每次尝试这样做时,都会出现以下错误:
Tree must not contain edu.ics.jung.graph.DelegateForest@17510d96
代码如下:
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
。
谁能帮我?我该如何解决这个问题?
没有找到相关结果
已邀请:
1 个回复
唤副埂侧壬