【发布时间】:2010-10-04 21:41:39
【问题描述】:
有没有人使用 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();
但它似乎不起作用。有什么提示吗?
【问题讨论】:
标签: java layout graph-theory prefuse