com.sdm.quasar.client.showcase.swing.dialogs.structured
Class StructuredDialog

java.lang.Object
  extended bycom.sdm.quasar.client.core.dialog.AbstractFeature
      extended bycom.sdm.quasar.client.showcase.swing.dialogs.structured.StructuredDialog
All Implemented Interfaces:
Feature, StructuredDialogActions, SystemInfoProvider

public class StructuredDialog
extends AbstractFeature
implements StructuredDialogActions

This is an example class demonstrates how to build a structured dialog (with presentation and dialog core). This class represents the dialog core.

The configuration of this dialog installs two features:

The connection from the presentation to the dialog core is made by the presentation with a call to DialogControl.getFeature( StructuredDialog.class)

In this case, the data is a simple data bean (StructuredDialogData) which is stored in an observable com.sdm.util.model.ValueModel that can be accessed using getStructuredDialogDataValueModel(). Alternatively you can use a separate model which can be either accessed by a getter on the dialog core or provided as a separate feature. In a more complex version the model can even be a DataManager.

The action is provided in form of a simple method StructuredDialogActions.changeMessage(). Alternatively you may use a com.sdm.quasar.client.core.actions.ActionProvider or com.sdm.quasar.client.core.events.StatefulEventProcessor as a dialog event mechanism.

Version:
1.0
Author:
Thomas Wolf, sd&m AG, Martin Haft, sd&m AG, Bernd Olleck, sd&m AG

Constructor Summary
StructuredDialog()
           
 
Method Summary
 void changeMessage()
          Request to change the message
protected  void dispose()
          Called when the feature or dialog is disposed.
 ValueModel getStructuredDialogDataValueModel()
          Provide the StructuredDialogData wrapped in a ValueHolder.
protected  void init()
          Called when the feature is initializing.
 
Methods inherited from class com.sdm.quasar.client.core.dialog.AbstractFeature
activate, attachDialogControl, collectSystemInfo, deactivate, disposeFeature, getDialogControl, isInitialized, prepare, release
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StructuredDialog

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

getStructuredDialogDataValueModel

public ValueModel getStructuredDialogDataValueModel()
Provide the StructuredDialogData wrapped in a ValueHolder.


changeMessage

public void changeMessage()
Description copied from interface: StructuredDialogActions
Request to change the message

Specified by:
changeMessage in interface StructuredDialogActions
See Also:
StructuredDialogActions.changeMessage()