com.sdm.quasar.client.core.embedding.features
Class SingleActivationControllerFeature

java.lang.Object
  extended bycom.sdm.quasar.client.core.dialog.AbstractFeature
      extended bycom.sdm.quasar.client.core.dialogbase.features.AbstractControllerFeature
          extended bycom.sdm.quasar.client.core.embedding.features.AbstractActivationControllerFeature
              extended bycom.sdm.quasar.client.core.embedding.features.SingleActivationControllerFeature
All Implemented Interfaces:
ActivationController, Feature, SingleActivationController, SystemInfoProvider

public class SingleActivationControllerFeature
extends AbstractActivationControllerFeature
implements SingleActivationController

A simple activation controller, that simply activates all subdialogs that where added to it (when itself is activated).

Version:
1.0
Author:
Thomas Wolf

Nested Class Summary
 
Nested classes inherited from class com.sdm.quasar.client.core.dialogbase.features.AbstractControllerFeature
AbstractControllerFeature.SubDialogController
 
Constructor Summary
SingleActivationControllerFeature()
          Creates a new SingleActivationControllerFeature.
 
Method Summary
 void addSubDialog(java.lang.String localName, SubDialogControl subDialogControl)
          Adds a new subdialog to get controlled by this controller.
 java.lang.String createUniqueName()
          Creates and returns a new unique name (may be used as local name).
protected  void dispose()
          Called when the feature or dialog is disposed.
 SubDialogControl getSubDialogControl(java.lang.String localName)
          Returns the SubDialogControl of an controlled subdialog which was registered under the local name given.
protected  void init()
          Called when the feature is initializing.
 void removeSubDialog(java.lang.String localName)
          Removes the specified previously added subdialog from this controller.
 void removeSubDialog(SubDialogControl subDialogControl)
          Removes the specified previously added subdialog from this controller.
 void setSubDialogActive(java.lang.String localName)
          Sets the controlled sub dialog with the given local name to active.
 
Methods inherited from class com.sdm.quasar.client.core.embedding.features.AbstractActivationControllerFeature
addActivationControllerListener, onChildActivated, onChildAdded, onChildDeactivated, onChildRemoved, removeActivationControllerListener
 
Methods inherited from class com.sdm.quasar.client.core.dialogbase.features.AbstractControllerFeature
activate, addSubDialogController, collectSystemInfo, deactivate, getLifeCycleState, getSubDialogController, getSubDialogController, getSubDialogController, getSubDialogControllerCount, hasSubDialogController, hasSubDialogController, hasSubDialogController, iterateSubDialogControllers, prepare, removeSubDialogController, removeSubDialogController, requestActivate, requestDeactivate
 
Methods inherited from class com.sdm.quasar.client.core.dialog.AbstractFeature
attachDialogControl, disposeFeature, getDialogControl, isInitialized, release
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sdm.quasar.client.core.embedding.ActivationController
addActivationControllerListener, removeActivationControllerListener
 

Constructor Detail

SingleActivationControllerFeature

public SingleActivationControllerFeature()
Creates a new SingleActivationControllerFeature.

Method Detail

init

protected void init()
Description copied from class: AbstractFeature
Called when the feature is initializing. This is normally done, when the feature is connected to the lifecycle of the DialogControl installed to. To access the DialogControl use the AbstractFeature.getDialogControl() method.

Override this method to perform some action on initialization e.g. register public services.

Specified by:
init in class AbstractFeature
See Also:
com.sdm.quasar.client.core.dialog.features.AbstractFeature#init()

dispose

protected void dispose()
                throws DisposeException
Description copied from class: AbstractFeature
Called when the feature or dialog is disposed. Override this method to clean up resources and free memory when disposing.

Specified by:
dispose in class AbstractFeature
Throws:
DisposeException
See Also:
com.sdm.quasar.client.core.dialog.features.AbstractFeature#dispose()

createUniqueName

public java.lang.String createUniqueName()
Creates and returns a new unique name (may be used as local name).


addSubDialog

public void addSubDialog(java.lang.String localName,
                         SubDialogControl subDialogControl)
Description copied from interface: SingleActivationController
Adds a new subdialog to get controlled by this controller.

Specified by:
addSubDialog in interface SingleActivationController
Parameters:
localName - a local name to choose (must be unique for this controller)
subDialogControl - the SubDialogControl for the controlled subdialog
See Also:
SingleActivationController.addSubDialog(java.lang.String, com.sdm.quasar.client.core.dialog.SubDialogControl)

removeSubDialog

public void removeSubDialog(SubDialogControl subDialogControl)
Description copied from interface: SingleActivationController
Removes the specified previously added subdialog from this controller.

Specified by:
removeSubDialog in interface SingleActivationController
Parameters:
subDialogControl - the SubDialogControl specifying the subdialog to remove
See Also:
SingleActivationController.removeSubDialog(com.sdm.quasar.client.core.dialog.SubDialogControl)

removeSubDialog

public void removeSubDialog(java.lang.String localName)
Description copied from interface: SingleActivationController
Removes the specified previously added subdialog from this controller.

Specified by:
removeSubDialog in interface SingleActivationController
Parameters:
localName - the local name specifying the subdialog to remove
See Also:
SingleActivationController.removeSubDialog(java.lang.String)

getSubDialogControl

public SubDialogControl getSubDialogControl(java.lang.String localName)
Description copied from interface: SingleActivationController
Returns the SubDialogControl of an controlled subdialog which was registered under the local name given.

Specified by:
getSubDialogControl in interface SingleActivationController
Parameters:
localName - the local name, where the subdialog was registered under
Returns:
the SubDialogControl of the controlled subdialog
See Also:
SingleActivationController.getSubDialogControl(java.lang.String)

setSubDialogActive

public void setSubDialogActive(java.lang.String localName)
Description copied from interface: SingleActivationController
Sets the controlled sub dialog with the given local name to active. If the given local name id null, no subdialog will become active.

Specified by:
setSubDialogActive in interface SingleActivationController
Parameters:
localName - the local name of the subdialog to activate or null to deactivate
See Also:
SingleActivationController.setSubDialogActive(java.lang.String)