if (newEdges != null) {
for (int i = 0; i < newEdges.length; i++) {
AbstractEdge e = newEdges[i];
if (e != null) {
dhns.getGraphStructure().addToDictionnary(e);
dhns.getEventManager().fireEvent(new EdgeEvent(EventType.ADD_EDGES, e, view));
}
}
}
}
List<AbstractNode> nodesToDelete = new ArrayList<AbstractNode>();
List<AbstractNode> nodesToKeep = new ArrayList<AbstractNode>();
for (TreeListIterator itr = new TreeListIterator(treeStructure.getTree(), 1); itr.hasNext();) {
AbstractNode node = itr.next();
if (!node.isEnabled()) {
nodesToDelete.add(node);
} else {
nodesToKeep.add(node);
}
}
for (AbstractNode node : nodesToDelete) {
//Del edges
AbstractEdge[] deletedEdges = edgeProcessor.clearEdges(node);
if (deletedEdges != null) {
for (int j = 0; j < deletedEdges.length; j++) {
if (deletedEdges[j] != null) {
dhns.getGraphStructure().removeFromDictionnary(deletedEdges[j]);
dhns.getEventManager().fireEvent(new EdgeEvent(EventType.REMOVE_EDGES, deletedEdges[j], view));
}
}
}
dhns.getGraphStructure().removeFromDictionnary(node);