i3.dragos.gm.core.event
Class GraphEntityEvent

java.lang.Object
  extended by java.util.EventObject
      extended by i3.dragos.core.services.events.DragosEvent
          extended by i3.dragos.gm.core.event.DataEvent
              extended by i3.dragos.gm.core.event.GraphEntityEvent
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AttributeModificationEvent, EdgeConnectionEvent

public class GraphEntityEvent
extends DataEvent

A GraphEntityEvent is triggered for graph entity related actions such as creating or destroying them.

Author:
Boris Boehlen <boehlen@cs.rwth-aachen.de>, Thorsten Hermes <thermes@i3.informatik.rwth-aachen.de>
See Also:
Serialized Form

Field Summary
static int CREATE
          Event type constant: Identifies the creation of a graph entity.
static int DESTROY
          Event type constant: Identifies the destruction of a graph entity.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
GraphEntityEvent(GraphEntity entity, int eventType)
          Constructs a new event.
 
Method Summary
 GraphEntity getGraphEntity()
          Returns the graph entity which caused the event.
 java.lang.String toString()
          
 
Methods inherited from class i3.dragos.gm.core.event.DataEvent
getAffectedElements, getDataSourceURL
 
Methods inherited from class i3.dragos.core.services.events.DragosEvent
getEventClass, getEventType
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CREATE

public static final int CREATE
Event type constant: Identifies the creation of a graph entity.

See Also:
Constant Field Values

DESTROY

public static final int DESTROY
Event type constant: Identifies the destruction of a graph entity.

See Also:
Constant Field Values
Constructor Detail

GraphEntityEvent

public GraphEntityEvent(GraphEntity entity,
                        int eventType)
Constructs a new event.

Parameters:
entity - The graph entity.
eventType - The type of event.
Method Detail

getGraphEntity

public GraphEntity getGraphEntity()
Returns the graph entity which caused the event. This is just a convenience to avoid casting the result of getSource().

Returns:
the graph entity which caused the event.

toString

public java.lang.String toString()

Overrides:
toString in class DragosEvent


Copyright © 2002-2008 RWTH Aachen, Department of Computer Science 3 (Software Engineering). All Rights Reserved.