|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.EventObject i3.dragos.core.services.events.DragosEvent i3.dragos.gm.core.event.DataEvent i3.dragos.gm.core.event.GraphEntityEvent i3.dragos.gm.core.event.EdgeConnectionEvent
public class EdgeConnectionEvent
An EdgeConnectionEvent
is triggered when an edge is
disconnected from an entity and / or connected to a new entity.
A note about undirected edges: Although no difference is made between the source and the target, these terms and corresponding fields are still used internally. A source or target change for an undirected edge thus only means that the connection stored in that field has changed.
Field Summary | |
---|---|
static int |
SOURCE_CHANGED
Event type constant: Identifies a change of the source entity. |
static int |
TARGET_CHANGED
Event type constant: Identifies a change of the target entity. |
Fields inherited from class i3.dragos.gm.core.event.GraphEntityEvent |
---|
CREATE, DESTROY |
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
EdgeConnectionEvent(Edge entity,
int eventType,
GraphEntity oldConnection,
GraphEntity newConnection)
Constructs a new event. |
Method Summary | |
---|---|
DataChangeSet |
getAffectedElements()
Returns a DataChangeSet of elements affected by this event. |
GraphEntity |
getNewConnection()
Returns the newly connected entity (may be null ). |
GraphEntity |
getOldConnection()
Returns the previously connected entity (may be null ). |
java.lang.String |
toString()
|
Methods inherited from class i3.dragos.gm.core.event.GraphEntityEvent |
---|
getGraphEntity |
Methods inherited from class i3.dragos.gm.core.event.DataEvent |
---|
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 |
---|
public static final int SOURCE_CHANGED
public static final int TARGET_CHANGED
Constructor Detail |
---|
public EdgeConnectionEvent(Edge entity, int eventType, GraphEntity oldConnection, GraphEntity newConnection)
entity
- The graph entity.eventType
- The type of event.oldConnection
- The previously connected entity (may be null
).newConnection
- The newly connected entity (may be null
).Method Detail |
---|
public GraphEntity getOldConnection()
null
).
null
).public GraphEntity getNewConnection()
null
).
null
).public DataChangeSet getAffectedElements()
This method is mainly used by the EventManager to determine which graph entities / graph entity classes need to be marked "dirty".
This list should only contain elements directly affected by the event. Any indirectly affected elements (subclasses, instances...) can be determined later automatically.
The default implementation in DataEvent returns a DataChangeSet that just contains the source of the event.
This implementation returns the edge as well as the old and new
source/target (if they are not null
).
getAffectedElements
in class DataEvent
null
).public java.lang.String toString()
toString
in class GraphEntityEvent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |