Package edu.cmu.tetrad.session
Class SessionSupport
java.lang.Object
edu.cmu.tetrad.session.SessionSupport
Handles firing of SessionSupport events to listeners.
- Author:
- josephramsey
-
Constructor Summary
ConstructorsConstructorDescriptionSessionSupport
(Object source) Constructs a new session support object for the given source object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a listener for SessionEvents.void
Fires an event indicating that an edge is about to be added.void
Fires an event indicating that an new execution of a node has begun.void
fireModelCreated
(SessionNode node) Fires an event indicating that a new model has been created for the given session node in the session.void
Fires an event indicating that the model for the given session node in the session has been destroyed.void
fireModelUnclear
(SessionNode node) Fires an event indicating that the model for the given session node in the session has been destroyed.void
fireNodeAdded
(SessionNode node) Fires an event indicating that a session node has been added to the session.void
fireNodeRemoved
(SessionNode node) Fires an event indicating that a sesison node has been removed from the session.void
fireParentAdded
(SessionNode parent, SessionNode child) Fires an event indicating that a parent has been added from the given parent to the given child session node in the session.void
fireParentRemoved
(SessionNode parent, SessionNode child) Fires an event indicating that a parent has been removed from the given parent to the given child session node in the session.void
Fires an event indicating that the model for the given session node in the session has been destroyed.void
fireSessionEvent
(SessionEvent event) Fires a session event.void
fireSessionEvent
(SessionEvent event, boolean restamp) Fires a session event.void
Removes a listener for SessionEvents.
-
Constructor Details
-
SessionSupport
Constructs a new session support object for the given source object. The source object will be stamped on all fired events.
-
-
Method Details
-
addSessionListener
Adds a listener for SessionEvents. -
removeSessionListener
Removes a listener for SessionEvents. -
fireNodeAdded
Fires an event indicating that a session node has been added to the session. -
fireNodeRemoved
Fires an event indicating that a sesison node has been removed from the session. -
fireParentAdded
Fires an event indicating that a parent has been added from the given parent to the given child session node in the session. -
fireParentRemoved
Fires an event indicating that a parent has been removed from the given parent to the given child session node in the session. -
fireModelCreated
Fires an event indicating that a new model has been created for the given session node in the session. -
fireModelDestroyed
Fires an event indicating that the model for the given session node in the session has been destroyed. -
fireModelUnclear
Fires an event indicating that the model for the given session node in the session has been destroyed. -
fireRepetitionChanged
Fires an event indicating that the model for the given session node in the session has been destroyed. -
fireExecutionStarted
public void fireExecutionStarted()Fires an event indicating that an new execution of a node has begun. -
fireAddingEdge
public void fireAddingEdge()Fires an event indicating that an edge is about to be added. -
fireSessionEvent
Fires a session event. Calls the correct method on the listener for the type of session event it is. All event fired with this session support are stamped with the source object of this session support. -
fireSessionEvent
Fires a session event. Calls the correct method on the listener for the type of session event it is. Events are restamped with the source object of this session support ifrestamp
is true.- Parameters:
event
- the session event to fire.restamp
- true iff the source of this event should be set to the source of this SessionSupport object.
-