1 package de.fzi.wim.guibase.graphview.graph;
2
3 import java.util.EventListener;
4 import java.util.Collection;
5
6 /***
7 * The listener for graph events.
8 */
9 public interface GraphListener extends EventListener {
10 /***
11 * Called when graph layout is updated.
12 *
13 * @param graph the graph
14 */
15 void graphLayoutUpdated(Graph graph);
16 /***
17 * Called when graph has changed, but no nodes have changed their position.
18 *
19 * @param graph the graph
20 */
21 void graphUpdated(Graph graph);
22 /***
23 * Called when graph contents is radically changed.
24 *
25 * @param graph the graph
26 */
27 void graphContentsChanged(Graph graph);
28 /***
29 * Called when elements are added to the graph.
30 *
31 * @param graph the graph
32 * @param nodes the nodes added (may be <code>null</code>)
33 * @param edges the edges added (may be <code>null</code>)
34 */
35 void elementsAdded(Graph graph,Collection nodes,Collection edges);
36 /***
37 * Called when elements are removed from the graph.
38 *
39 * @param graph the graph
40 * @param nodes the nodes added (may be <code>null</code>)
41 * @param edges the edges added (may be <code>null</code>)
42 */
43 void elementsRemoved(Graph graph,Collection nodes,Collection edges);
44 }