Esempio n. 1
0
 /**
  * Fires an event to notify GraphItemChangeListeners of the adding/removal of an edge.
  *
  * @param item The edge which was added or removed.
  * @param action The action which was performed. One of GraphItemChangeEvent.ADDED or
  *     GraphItemChangeEvent.REMOVED
  */
 private void fireEdgeChangeEvent(E item, int action) {
   GraphItemChangeEvent<E> event = new GraphItemChangeEvent<E>(this, item, action);
   for (GraphItemChangeListener<E> e : edgeChangeListeners) e.stateChanged(event);
 }
Esempio n. 2
0
 /**
  * Fires an event to notify GraphItemChangeListeners of the adding/removal of a vertex.
  *
  * @param item The vertex which was added or removed.
  * @param action The action which was performed. One of GraphItemChangeEvent.ADDED or
  *     GraphItemChangeEvent.REMOVED
  */
 private void fireVertexChangeEvent(V item, int action) {
   GraphItemChangeEvent<V> event = new GraphItemChangeEvent<V>(this, item, action);
   for (GraphItemChangeListener<V> v : vertexChangeListeners) {
     v.stateChanged(event);
   }
 }