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

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.MultipleActivationControllerFeature
All Implemented Interfaces:
ActivationController, Feature, MultipleActivationController, SystemInfoProvider

public class MultipleActivationControllerFeature
extends AbstractActivationControllerFeature
implements MultipleActivationController

An ActivationController, that manages a set of sub dialogs with a local name. Any of the sub dialogs can be activated or deactivated. Per default an added sub dialog will be 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
MultipleActivationControllerFeature()
          Creates a new MultipleActivationControllerFeature.
 
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.
 boolean hasSubDialogControl(java.lang.String localName)
          Checks if a SubDialogControl has been registered under the given local name.
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, boolean active)
          Sets the controlled sub dialog with the given local name to active or inactive.
 
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

MultipleActivationControllerFeature

public MultipleActivationControllerFeature()
Creates a new MultipleActivationControllerFeature.

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: MultipleActivationController
Adds a new subdialog to get controlled by this controller.

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

removeSubDialog

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

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

removeSubDialog

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

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

getSubDialogControl

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

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

hasSubDialogControl

public boolean hasSubDialogControl(java.lang.String localName)
Description copied from interface: MultipleActivationController
Checks if a SubDialogControl has been registered under the given local name.

Specified by:
hasSubDialogControl in interface MultipleActivationController
Parameters:
localName - the local name, where the subdialog was registered under
Returns:
true if a subdialog has been registered, false if not
See Also:
MultipleActivationController.hasSubDialogControl(java.lang.String)

setSubDialogActive

public void setSubDialogActive(java.lang.String localName,
                               boolean active)
Description copied from interface: MultipleActivationController
Sets the controlled sub dialog with the given local name to active or inactive.

Specified by:
setSubDialogActive in interface MultipleActivationController
Parameters:
localName - the local name of the subdialog to activate
See Also:
MultipleActivationController.setSubDialogActive(java.lang.String, boolean)