你有使用prefuse图形工具包的经验吗?是否可以更改已显示的图形,例如添加/删除节点和/或边缘,并使显示正确适应?
例如,prefuse带有一个示例,可将朋友网络可视化:
我希望你能够做一些与此类似的事情:http://prefuse.org/doc/manual/introduction/example/Example.java
// -- 7. add new nodes on the fly -------------------------------------
new Timer(2000, new ActionListener() {
private Node oldNode = graph.nodes().next(); // init with random node
public void actionPerformed(ActionEvent e) {
// insert new node //
Node newNode = graph.addNode();
// insert new edge //
graph.addEdge(oldNode, newNode);
// remember node for next call //
oldNode = newNode;
}
}).start();
但似乎它不起作用。有什么提示吗?