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 TypeMethodDescriptionvoidAdds a listener for SessionEvents.voidFires an event indicating that an edge is about to be added.voidFires an event indicating that an new execution of a node has begun.voidfireModelCreated(SessionNode node) Fires an event indicating that a new model has been created for the given session node in the session.voidFires an event indicating that the model for the given session node in the session has been destroyed.voidfireModelUnclear(SessionNode node) Fires an event indicating that the model for the given session node in the session has been destroyed.voidfireNodeAdded(SessionNode node) Fires an event indicating that a session node has been added to the session.voidfireNodeRemoved(SessionNode node) Fires an event indicating that a sesison node has been removed from the session.voidfireParentAdded(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.voidfireParentRemoved(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.voidFires an event indicating that the model for the given session node in the session has been destroyed.voidfireSessionEvent(SessionEvent event) Fires a session event.voidfireSessionEvent(SessionEvent event, boolean restamp) Fires a session event.voidRemoves 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 ifrestampis 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.
-