Gephi Toolkit Javadoc

org.gephi.graph.api
Interface GraphEvent


public interface GraphEvent

Graph event interface, that GraphListener receives when the graph is modified. Each event is specific to a particular view, which can be get from the getSource() method.

- ADD_NODES_AND_EDGES:Add nodes and edges to the graph
- REMOVE_NODES_AND_EDGES:Remove nodes and edges from the graph
- MOVE_NODE:Move nodes on the hierarchy, parent node is changed
- VISIBLE_VIEW:Current visible view is changed
- NEW_VIEW:A new view is created
- DESTROY_VIEW:A view is destroyed
- EXPAND:Expand nodes in the hierarchy
- RETRACT:Retract nodes in the hierarchy
- META_EDGES_UPDATEMeta-Edges are updated

Author:
Mathieu Bastian
See Also:
GraphView

Nested Class Summary
static class GraphEvent.EventType
           - ADD_NODES_AND_EDGES:Add nodes and edges to the graph - REMOVE_NODES_AND_EDGES:Remove nodes and edges from the graph, with their edges - MOVE_NODE:Move nodes on the hierarchy, parent node is changed - VISIBLE_VIEW:Current visible view is changed - NEW_VIEW:A new view is created - DESTROY_VIEW:A view is destroyed - EXPAND:Expand nodes in the hierarchy - RETRACT:Retract nodes in the hierarchy - META_EDGES_UPDATEMeta-Edges are updated
 
Method Summary
 GraphEventData getData()
          Returns the data associated to this event.
 GraphEvent.EventType getEventType()
          Returns the type of event.
 GraphView getSource()
          Returns the view this event is triggered.
 boolean is(GraphEvent.EventType... type)
          Returns true if this event is one of these in parameters.
 

Method Detail

getEventType

GraphEvent.EventType getEventType()
Returns the type of event.

Returns:
the type of event, can't be null

getData

GraphEventData getData()
Returns the data associated to this event.

Returns:
the graph event data

getSource

GraphView getSource()
Returns the view this event is triggered.

Returns:
the source of the vent

is

boolean is(GraphEvent.EventType... type)
Returns true if this event is one of these in parameters.

Parameters:
type - the event types that are to be compared with this event
Returns:
true if this event is type, false otherwise

Gephi Toolkit Javadoc