/** * A node has been been added to the registered graph or one of its subgraphs. The added node is * the "source" of the event. */ public void nodeAdded(GraphEvent e) { if (e.getSource() != AbstractGraphController.this) { drawNode(e.getTarget()); } }
/** * A node has been been deleted from the registered graphs or one of its subgraphs. The deleted * node is the "source" of the event. The previous parent graph is accessible via * e.getOldValue(). */ public void nodeRemoved(GraphEvent e) { if (e.getSource() != AbstractGraphController.this) { // Remove the figure from the view clearNode(e.getTarget()); } }
/** * An edge's tail has been changed in a registered graph or one of its subgraphs. The added edge * is the "source" of the event. The previous tail is accessible via e.getOldValue(). */ public void edgeTailChanged(GraphEvent e) { if (e.getSource() != AbstractGraphController.this) { rerenderEdge(e.getTarget()); } }