Package edu.cmu.tetrad.session
Class SessionEvent
java.lang.Object
java.util.EventObject
edu.cmu.tetrad.session.SessionEvent
- All Implemented Interfaces:
Serializable
Notifies a listener that some change has occurred in the session--a node has
been added or removed, an edge has been added or removed, a model has been
created or destroyed.
- Author:
- Joseph Ramsey
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionSessionEvent(Object source, int type) Constructs an event where one session node is involved--session node added or removed, model created or destroyed.SessionEvent(Object source, SessionEvent event) Creates a new SessionEvent with the same information as the given event but with a new source.SessionEvent(Object source, SessionNode node, int type) Constructs an event where one session node is involved--session node added or removed, model created or destroyed.SessionEvent(Object source, SessionNode parent, SessionNode child, int type) Constructs an event where two session nodes are involved--parent added or removed. -
Method Summary
Methods inherited from class java.util.EventObject
getSource, toString
-
Field Details
-
NODE_ADDED
public static final int NODE_ADDED- See Also:
-
NODE_REMOVED
public static final int NODE_REMOVED- See Also:
-
PARENT_ADDED
public static final int PARENT_ADDED- See Also:
-
PARENT_REMOVED
public static final int PARENT_REMOVED- See Also:
-
MODEL_CREATED
public static final int MODEL_CREATED- See Also:
-
MODEL_DESTROYED
public static final int MODEL_DESTROYED- See Also:
-
MODEL_UNCLEAR
public static final int MODEL_UNCLEAR- See Also:
-
EXECUTION_STARTED
public static final int EXECUTION_STARTED- See Also:
-
REPETITION_CHANGED
public static final int REPETITION_CHANGED- See Also:
-
ADDING_EDGE
public static final int ADDING_EDGE- See Also:
-
-
Constructor Details
-
SessionEvent
Constructs an event where one session node is involved--session node added or removed, model created or destroyed. -
SessionEvent
Constructs an event where one session node is involved--session node added or removed, model created or destroyed. -
SessionEvent
Constructs an event where two session nodes are involved--parent added or removed. -
SessionEvent
Creates a new SessionEvent with the same information as the given event but with a new source.
-
-
Method Details
-
getNode
- Returns:
- the session node set, if this event was constructed using one session node.
-
getParent
- Returns:
- the parent session node set, if this is an event constructed using two session nodes.
-
getChild
- Returns:
- the child session node set, if this is an event constructed using two session nodes
-
getType
public int getType()- Returns:
- the type of this event--one of NODE_ADDED, NODE_REMOVED, PARENT_ADDED, PARENT_REMOVED, MODEL_CREATED, MODEL_DESTROYED, MODEL_UNCLEAR.
-