I don't want to keep track of all vertices in order to delete them. Is there a suitable method for deleting all vertices?
Found "mxGraphModel.clear()" but am not sure after reading the javadoc about what it does:
E g, will it clear other things but the vertices (and edges)?
Another approach perhaps then is "mxGraph.removeCells(mxGraphModel.getCells().values().toArray(new Object))", that I understand better but is a bit long...
This works great for cells and I assume that if I remove all cells from a graph that also all edges are gone associated with a cell. If the graph is referenced by a graphComponent then it will also remove alle cells from the swing component. But if there are single edges left, which weren't linked to a cell, than they will stay. How can I get rid of these?
So, is there a function to clean the graph component?