Package org.graffiti.event
Class GraphEvent
java.lang.Object
java.util.EventObject
org.graffiti.event.AbstractEvent
org.graffiti.event.GraphEvent
- All Implemented Interfaces:
Serializable
public class GraphEvent extends AbstractEvent
Contains a graph event. A
GraphEvent
object is passed to every
GraphListener
or AbstractGraphListener
object which
is registered to receive the "interesting" graph events using the component's
addGraphListener
method. (AbstractGraphListener
objects implement the GraphListener
interface.) Each such
listener object gets a GraphEvent
containing the graph event.- Version:
- $Revision: 1.6 $
- See Also:
GraphListener
,AbstractGraphListener
, Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class org.graffiti.event.AbstractEvent
AbstractEvent.EVENTTYPE
-
Constructor Summary
Constructors Constructor Description GraphEvent(Edge edge)
Constructs a graph event object with the specified source component.GraphEvent(Graph graph)
Constructs a graph event object with the specified source component.GraphEvent(Node node)
Constructs a graph event object with the specified source component.GraphEvent(Node node, Node secondNode)
Constructs a graph event object with the graph of the first node as source and saves the two given nodes. -
Method Summary
Modifier and Type Method Description Attributable
getAttributeable()
Edge
getEdge()
Returns the edge that originates this event, e.g.: the edge that has been added.Graph
getGraph()
Returns the graph that has been changed.Node
getNode()
Returns the node that is concerned with that event, e.g.: the node that has been / is to be removed.Node
getSecondNode()
Returns the node that is concerned with that event, e.g.: the node that has been / is to be removed.Methods inherited from class org.graffiti.event.AbstractEvent
getEventType, setEventType
Methods inherited from class java.util.EventObject
getSource, toString
-
Constructor Details
-
GraphEvent
Constructs a graph event object with the specified source component.- Parameters:
graph
- the graph that originated the event.
-
GraphEvent
Constructs a graph event object with the specified source component.- Parameters:
edge
- the edge that originated the event.
-
GraphEvent
Constructs a graph event object with the specified source component.- Parameters:
node
- the node that originated the event.
-
GraphEvent
Constructs a graph event object with the graph of the first node as source and saves the two given nodes.- Parameters:
node
- the node that originated the event.secondNode
- the second node that originated the event.
-
-
Method Details
-
getEdge
Returns the edge that originates this event, e.g.: the edge that has been added. Might returnnull
if no edge is concerned.- Returns:
- the edge that is concerned with the event
-
getGraph
Returns the graph that has been changed.- Returns:
- the graph that has been changed by this event.
-
getNode
Returns the node that is concerned with that event, e.g.: the node that has been / is to be removed. Might returnnull
if no node is concerned.- Returns:
- the edge that is concerned with the event.
-
getSecondNode
Returns the node that is concerned with that event, e.g.: the node that has been / is to be removed. Might returnnull
if no node is concerned.- Returns:
- the edge that is concerned with the event.
-
getAttributeable
-