com.sdm.quasar.client.core.dialog.impl
Class DefaultLifeCycleListenerSupport

java.lang.Object
  extended bycom.sdm.quasar.client.core.dialog.impl.DefaultLifeCycleListenerSupport
All Implemented Interfaces:
LifeCycleListener, LifeCycleListenerSupport

public class DefaultLifeCycleListenerSupport
extends java.lang.Object
implements LifeCycleListenerSupport, LifeCycleListener

This helper class eases the implementation of LifeCycleListenerSupport. It implements the interface and manages registered TechnicalDialogLifeCycleListener's.

To use this helper, an implementor of LifeCycleListenerSupport should delegate ther interface methods to this helper class instance and call the lifecycle-methods on the helper if notification should be sent.

Version:
1.$Revision$
Author:
Thomas Wolf

Constructor Summary
DefaultLifeCycleListenerSupport()
          Creates a new DefaultLifeCycleListenerSupport.
 
Method Summary
 void addLifeCycleListener(LifeCycleListener listener)
          Registers an observer of the life cycle of dialogs.
 void finishLifeCycleNotification(DialogInstanceId diid)
          Finishes notifying all current lifecycle notifications of this DefaultLifeCycleListenerSupport.
 void lifeCycleStateChanged(DialogInstanceId diid, LifeCycleState state, LifeCycleState previousState, LifeCycleCompletionLevel completionLevel)
          Notification: A dialog has changed from DialogLifeCycleState fromDialogLifeCycleState to
 void removeLifeCycleListener(LifeCycleListener listener)
          Unregisters an observer of the life cycle of dialogs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLifeCycleListenerSupport

public DefaultLifeCycleListenerSupport()
Creates a new DefaultLifeCycleListenerSupport.

Method Detail

addLifeCycleListener

public void addLifeCycleListener(LifeCycleListener listener)
Description copied from interface: LifeCycleListenerSupport
Registers an observer of the life cycle of dialogs. The order of the registration of observers are preserved. The observers are notified in reverse order.

Specified by:
addLifeCycleListener in interface LifeCycleListenerSupport
Parameters:
listener - the listener to add
See Also:
com.sdm.quasar.client.comp.dlgdef.mgmt.TechnicalDialogLifeCycleObservable#addDialogLifeCycleListener(com.sdm.quasar.client.comp.dlgdef.mgmt.TechnicalDialogLifeCycleListener)

removeLifeCycleListener

public void removeLifeCycleListener(LifeCycleListener listener)
Description copied from interface: LifeCycleListenerSupport
Unregisters an observer of the life cycle of dialogs.

Specified by:
removeLifeCycleListener in interface LifeCycleListenerSupport
Parameters:
listener - the listener to remove
See Also:
com.sdm.quasar.client.comp.dlgdef.mgmt.TechnicalDialogLifeCycleObservable#removeDialogLifeCycleListener(com.sdm.quasar.client.comp.dlgdef.mgmt.TechnicalDialogLifeCycleListener)

lifeCycleStateChanged

public void lifeCycleStateChanged(DialogInstanceId diid,
                                  LifeCycleState state,
                                  LifeCycleState previousState,
                                  LifeCycleCompletionLevel completionLevel)
Description copied from interface: LifeCycleListener
Notification: A dialog has changed from DialogLifeCycleState fromDialogLifeCycleState to
Specified by:
lifeCycleStateChanged in interface LifeCycleListener
Parameters:
diid - The instance is of the dialog, that has changed the state
state - the LifeCycleState state
previousState - the previous LifeCycleState
completionLevel - the completion level of the state if in a transition state
See Also:
LifeCycleListener.lifeCycleStateChanged(com.sdm.quasar.client.core.dialog.DialogInstanceId, com.sdm.quasar.client.core.dialog.lifecycle.LifeCycleState, com.sdm.quasar.client.core.dialog.lifecycle.LifeCycleState, com.sdm.quasar.client.core.dialog.lifecycle.LifeCycleCompletionLevel)

finishLifeCycleNotification

public void finishLifeCycleNotification(DialogInstanceId diid)
Finishes notifying all current lifecycle notifications of this DefaultLifeCycleListenerSupport. all notification were finished