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

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

public class TabCompositeFeature
extends AbstractCompositeFeature

An embedding feature, which can embed child dialogs (which are managed by an SingleActivationController) into one or more JTabbedPanes.

Version:
1.$Revision$
Author:
Thomas Wolf

Constructor Summary
TabCompositeFeature()
           
 
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.
 SingleActivationController getActivationController()
          Returns the SingleActivationController for this TabCompositeFeature.
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(SingleActivationController controller)
          Sets the ActivationController for this TabCompositeFeature.
 void setLayoutConstraints(java.lang.String localName, javax.swing.JTabbedPane tabbedPane, int tabIndex)
          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

TabCompositeFeature

public TabCompositeFeature()
Method Detail

setActivationController

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

Parameters:
controller - the SingleActivationController to use

getActivationController

public SingleActivationController getActivationController()
Returns the SingleActivationController for this TabCompositeFeature.


setLayoutConstraints

public void setLayoutConstraints(java.lang.String localName,
                                 javax.swing.JTabbedPane tabbedPane,
                                 int tabIndex)
Defines the layout constraints for the child with the given local name.

Note: This TabCompositeFeature 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)
tabbedPane - the JTabbedPane to set
tabIndex - the tab index to set

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

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

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

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)