com.sdm.quasar.client.swing.embedding.features
Class PanelCompositeFeature

java.lang.Object
  extended bycom.sdm.quasar.client.core.dialog.AbstractFeature
      extended bycom.sdm.quasar.client.core.embedding.features.AbstractCompositeFeature
          extended bycom.sdm.quasar.client.swing.embedding.features.PanelCompositeFeature
All Implemented Interfaces:
Feature, SystemInfoProvider

public class PanelCompositeFeature
extends AbstractCompositeFeature

An embedding feature, which can embed child dialogs (which are managed by an ActivationController) into one or more panels with an arbitrary layout manager.

Version:
1.$Revision$
Author:
Thomas Wolf

Constructor Summary
PanelCompositeFeature()
           
 
Method Summary
protected  void activate()
          Called when the dialog is activated.
protected  void childActivated(java.lang.String localName, SubDialogControl subDialogControl)
           
protected  void childAdded(java.lang.String localName, SubDialogControl subDialogControl)
           
protected  void childDeactivated(java.lang.String localName, SubDialogControl subDialogControl)
           
protected  void childRemoved(java.lang.String localName, SubDialogControl subDialogControl)
           
 void collectSystemInfo(SystemInfoNode root, SystemInfoOptions options)
           Subclasses should overwrite this method to append system informations
protected  void deactivate()
          Called when the dialog is deactivated.
protected  void dispose()
          Called when the feature or dialog is disposed.
 ActivationController getActivationController()
          Returns the ActivationController for this PanelCompositeFeature.
protected  void init()
          Called when the feature is initializing.
protected  void prepare()
          Called when the dialog is prepared.
protected  void release()
          Called when the dialog is released.
 void removeLayoutConstraints(java.lang.String localName)
          Removes previously added layout constraints for the child with the given name.
 void setActivationController(ActivationController controller)
          Sets the ActivationController for this PanelCompositeFeature.
 void setLayoutConstraints(java.lang.String localName, java.awt.Container parentContainer, java.lang.Object layoutConstraints)
          Defines the layout constraints for the child with the given local name.
 
Methods inherited from class com.sdm.quasar.client.core.embedding.features.AbstractCompositeFeature
getActivationControllerInt, requireActivationController, setActivationControllerInt
 
Methods inherited from class com.sdm.quasar.client.core.dialog.AbstractFeature
attachDialogControl, disposeFeature, getDialogControl, isInitialized
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PanelCompositeFeature

public PanelCompositeFeature()
Method Detail

setActivationController

public void setActivationController(ActivationController controller)
Sets the ActivationController for this PanelCompositeFeature.


getActivationController

public ActivationController getActivationController()
Returns the ActivationController for this PanelCompositeFeature.


setLayoutConstraints

public void setLayoutConstraints(java.lang.String localName,
                                 java.awt.Container parentContainer,
                                 java.lang.Object layoutConstraints)
Defines the layout constraints for the child with the given local name.

Note: This PanelCompositeFeature must have been connected to an ActivationController using AbstractCompositeFeature.setActivationControllerInt(ActivationController) before calling this method (otherwise an IllegalStateException will be thrown).

Parameters:
localName - the name of the child (not null)
parentContainer - the parent Container of the visual representation (not null)
layoutConstraints - the constraints (may be null)

removeLayoutConstraints

public void removeLayoutConstraints(java.lang.String localName)
Removes previously added layout constraints for the child with the given name.

Parameters:
localName - the local name of the child to remove constraints for

childAdded

protected void childAdded(java.lang.String localName,
                          SubDialogControl subDialogControl)
Specified by:
childAdded in class AbstractCompositeFeature
See Also:
AbstractCompositeFeature.childAdded(java.lang.String, com.sdm.quasar.client.core.dialog.SubDialogControl)

childActivated

protected void childActivated(java.lang.String localName,
                              SubDialogControl subDialogControl)
Specified by:
childActivated in class AbstractCompositeFeature
See Also:
AbstractCompositeFeature.childActivated(java.lang.String, com.sdm.quasar.client.core.dialog.SubDialogControl)

childDeactivated

protected void childDeactivated(java.lang.String localName,
                                SubDialogControl subDialogControl)
Specified by:
childDeactivated in class AbstractCompositeFeature
See Also:
AbstractCompositeFeature.childDeactivated(java.lang.String, com.sdm.quasar.client.core.dialog.SubDialogControl)

childRemoved

protected void childRemoved(java.lang.String localName,
                            SubDialogControl subDialogControl)
Specified by:
childRemoved in class AbstractCompositeFeature
See Also:
AbstractCompositeFeature.childRemoved(java.lang.String, com.sdm.quasar.client.core.dialog.SubDialogControl)

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()

prepare

protected void prepare()
Description copied from class: AbstractFeature
Called when the dialog is prepared. Override this method if you want to perform some action on LifeCycle.prepare(), e.g. gain resource and provide services for childs.

The default implementation in AbstractFeature does nothing.

Specified by:
prepare in class AbstractCompositeFeature
See Also:
AbstractCompositeFeature.prepare()

activate

protected void activate()
Description copied from class: AbstractFeature
Called when the dialog is activated. Override this method if you want to perform some action on LifeCycle.activate().

The default implementation in AbstractFeature does nothing.

Specified by:
activate in class AbstractCompositeFeature
See Also:
AbstractCompositeFeature.activate()

deactivate

protected void deactivate()
Description copied from class: AbstractFeature
Called when the dialog is deactivated. Override this method if you want to perform some action on LifeCycle.deactivate()().

The default implementation in AbstractFeature does nothing.

Specified by:
deactivate in class AbstractCompositeFeature
See Also:
AbstractCompositeFeature.deactivate()

release

protected void release()
Description copied from class: AbstractFeature
Called when the dialog is released. Override this method if you want to perform some action on LifeCycle.release()(), e.g. unregister services.

The default implementation in AbstractFeature does nothing.

Specified by:
release in class AbstractCompositeFeature
See Also:
AbstractCompositeFeature.release()

collectSystemInfo

public void collectSystemInfo(SystemInfoNode root,
                              SystemInfoOptions options)
Description copied from class: AbstractFeature
Builds the system information tree upon local information of the implementor. The system information tree can be used within development by inspecting the system; so implementors should append their internal state (depending on the details settings within SystemInfoOptions). The information can be appended to the tree by adding new child SystemInformationNodes to the root node given using the SystemInfoNode.createChild(String) method and by setting information attributes the these nodes or the given root node. Subclasses should overwrite this method to append system informations

Specified by:
collectSystemInfo in interface SystemInfoProvider
Overrides:
collectSystemInfo in class AbstractCompositeFeature
See Also:
AbstractCompositeFeature.collectSystemInfo(com.sdm.quasar.client.core.common.sysinfo.SystemInfoNode, com.sdm.quasar.client.core.common.sysinfo.SystemInfoOptions)