VertexType
- Must be the same as the VertexType of the graphEdgeType
- Must be the same as the EdgeType of the graphpublic interface GraphListener<VertexType,EdgeType>
Modifier and Type | Method and Description |
---|---|
void |
beginUpdate()
Called before multiple operations will be done consecutively.
|
boolean |
callEdgeRemovedWhenRemovingVertex()
When a vertex is deleted, every incident edge is deleted, too.
|
void |
edgeAdded(EdgeType edge,
java.lang.Object message)
Called whenever an edge was added to the graph.
|
void |
edgeRemoved(EdgeType edge)
Called whenever an edge was removed from the graph.
|
void |
edgeWeightSet(EdgeType edge)
Called whenever an edge weight was changed.
|
void |
endUpdate()
Called after multiple operations have been done consecutively.
|
GraphLibrary<VertexType,EdgeType> |
getGraph()
Returns the graph in which this listener was added.
|
java.lang.Object |
getSyncObject()
Returns the object to synchronize with when invoking the listener and the graph elements in parallel.
|
void |
graphCreated()
Called whenever the graph was created (e.g.
|
void |
graphRecreated()
Called whenever the graph was created with the same settings.
|
void |
vertexAdded(VertexType vertex,
java.lang.Object message)
Called whenever a vertex was added to the graph.
|
void |
vertexRemoved(VertexType vertex)
Called whenever a vertex was removed from the graph.
|
void graphCreated()
void graphRecreated()
void vertexAdded(VertexType vertex, java.lang.Object message)
vertex
- the vertex which was just added.message
- an optional message to the listener. Might be null.void edgeAdded(EdgeType edge, java.lang.Object message)
edge
- the edge which was just added.message
- an optional message to the listener. Might be null.void vertexRemoved(VertexType vertex)
vertex
- the vertex which was just removed.void edgeRemoved(EdgeType edge)
edge
- the edge which was just removed.void edgeWeightSet(EdgeType edge)
edge
- the edge of which the edge weight was just set.void beginUpdate()
void endUpdate()
GraphLibrary<VertexType,EdgeType> getGraph()
java.lang.Object getSyncObject()
boolean callEdgeRemovedWhenRemovingVertex()