Class SessionEvent

java.lang.Object
java.util.EventObject
edu.cmu.tetrad.session.SessionEvent
All Implemented Interfaces:
Serializable

public class SessionEvent extends EventObject
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:
josephramsey
See Also:
  • Field Details

  • Constructor Details

    • SessionEvent

      public SessionEvent(Object source, int type)
      Constructs an event where one session node is involved--session node added or removed, model created or destroyed.
    • SessionEvent

      public 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

      public SessionEvent(Object source, SessionNode parent, SessionNode child, int type)
      Constructs an event where two session nodes are involved--parent added or removed.
    • SessionEvent

      public SessionEvent(Object source, SessionEvent event)
      Creates a new SessionEvent with the same information as the given event but with a new source.
  • Method Details

    • getNode

      public SessionNode getNode()
      Returns:
      the session node set, if this event was constructed using one session node.
    • getParent

      public SessionNode getParent()
      Returns:
      the parent session node set, if this is an event constructed using two session nodes.
    • getChild

      public SessionNode 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.