| Is .clear() no longer supported? [message #884142] |
Sun, 10 June 2012 03:59  |
Hassan M. Messages: 7 Registered: September 2011 Location: Ohio |
Junior Member |
|
|
I've just downloaded the current version of Zest. One of the JAR files is called org.eclipse.zest.core_1.3.0.v20110221-2050.jar. So, my code uses a clear() method for clearing all the elements in a graph, like this:
wbsGraph = new Graph(this,SWT.NONE);
...
wbsGraph.clear();
But this doesn't work anymore. Was this method removed from the current version? Is there another way of doing this?
|
|
|
|
| Re: Is .clear() no longer supported? [message #884356 is a reply to message #884293] |
Sun, 10 June 2012 18:39  |
Hassan M. Messages: 7 Registered: September 2011 Location: Ohio |
Junior Member |
|
|
Okay, well that wasn't there. I got the sources and added that function (to Graph.java), and that seemed to work. However, I don't know what subGraphFigures are, but that part wasn't working so I just commented it out:
public void clear() {
for (Iterator i = new ArrayList(connections).iterator(); i.hasNext();) {
removeConnection((GraphConnection) i.next());
}
//for (Iterator i = new HashSet(subgraphFigures).iterator(); i.hasNext();) {
//removeSubgraphFigure((IFigure) i.next());
//}
for (Iterator i = new ArrayList(nodes).iterator(); i.hasNext();) {
removeNode((GraphNode) i.next());
}
}
Anyway, thanks for the help!
[Updated on: Sun, 10 June 2012 18:40] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.01563 seconds