/** @see VertexSetListener#vertexRemoved(GraphVertexChangeEvent) */ public void vertexRemoved(GraphVertexChangeEvent<V> e) { V jtVertex = e.getVertex(); if (!jtElementsBeingRemoved.remove(jtVertex)) { handleJGraphTRemoveVertex(jtVertex); } }
@Override public void vertexRemoved(final GraphVertexChangeEvent<Spot> event) { if (null == connectedEdgeSets) { return; } final Spot v = event.getVertex(); vertexToID.remove(v); final Integer id = vertexToID.get(v); if (id != null) { final Set<Spot> set = connectedVertexSets.get(id); if (null == set) { return; // it was removed when removing the // last edge of a track, most // likely. } set.remove(v); if (set.isEmpty()) { connectedEdgeSets.remove(id); connectedVertexSets.remove(id); names.remove(id); visibility.remove(id); } } }
/** @see VertexSetListener#vertexRemoved(GraphVertexChangeEvent) */ public void vertexRemoved(GraphVertexChangeEvent<V> e) { predecessorMap.remove(e.getVertex()); successorMap.remove(e.getVertex()); }