com.sdm.quasar.client.core.dialog.services
Class DefaultDialogConfiguration

java.lang.Object
  extended bycom.sdm.quasar.client.core.dialog.services.DefaultDialogConfiguration
All Implemented Interfaces:
DialogConfiguration, DialogProperties, SystemInfoProvider

public class DefaultDialogConfiguration
extends java.lang.Object
implements DialogConfiguration, DialogProperties, SystemInfoProvider

A default implementation of DialogConfiguration and DialogProperties. The added feature classes (see addFeatureClass(Class) and setFeatureClasses(Class[])) were instanciated and registered to the dialog instance on configuration. Via DialogProperties, all defined properties (see addProperty(String, Object) and setPropertyMap(Map)) can be accessed.

Version:
1.$Revision$
Author:
Thomas Wolf

Constructor Summary
DefaultDialogConfiguration()
          Creates a new DefaultDialogConfiguration.
DefaultDialogConfiguration(java.lang.Class[] featureClasses)
          Creates a new DefaultDialogConfiguration.
 
Method Summary
 void addFeature(Feature feature)
          Adds another feature's class name to get installed to the configured dialog.
 void addFeatureClass(java.lang.Class featureClass)
          Adds another feature's class name to get installed to the configured dialog.
 void addFeatureClassName(java.lang.String featureClassName)
          Adds another feature's class name to get installed to the configured dialog.
 void addFeatureClassName(java.lang.String featureKeyClassName, java.lang.String featureClassName)
          Adds another feature's class name to get installed to the configured dialog.
 void addProperty(java.lang.String propertyKey, java.lang.Object propertyValue)
          Stores a property key-value mapping at this DialogConfiguration.
 void collectSystemInfo(SystemInfoNode root, SystemInfoOptions options)
          Builds the system information tree upon local information of the implementor.
 void configureDialog(DialogControl dialogControl, DialogProperties dialogProperties)
          Initially configures the dialog represented by the given DialogControl.
 java.lang.Object getProperty(java.lang.String propertyKey)
          Returns the property value for the given property key.
 void setFeatureClasses(java.lang.Class[] featureClasses)
           
 void setFeatureMap(java.util.Map featureMap)
           
 void setFeatures(java.util.List featureList)
           
 void setPropertyMap(java.util.Map propertyMap)
          Defines all properties by the given property map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDialogConfiguration

public DefaultDialogConfiguration()
Creates a new DefaultDialogConfiguration.


DefaultDialogConfiguration

public DefaultDialogConfiguration(java.lang.Class[] featureClasses)
Creates a new DefaultDialogConfiguration.

Method Detail

setFeatureClasses

public void setFeatureClasses(java.lang.Class[] featureClasses)

setFeatures

public void setFeatures(java.util.List featureList)

setFeatureMap

public void setFeatureMap(java.util.Map featureMap)

addFeatureClass

public void addFeatureClass(java.lang.Class featureClass)
Adds another feature's class name to get installed to the configured dialog.

Parameters:
featureClass - the class name of a feature to get installed

addFeatureClassName

public void addFeatureClassName(java.lang.String featureClassName)
Adds another feature's class name to get installed to the configured dialog.

Parameters:
featureClassName - the class name of a feature to get installed

addFeatureClassName

public void addFeatureClassName(java.lang.String featureKeyClassName,
                                java.lang.String featureClassName)
Adds another feature's class name to get installed to the configured dialog.

Parameters:
featureKeyClassName - the class name of a feature key class to get installed
featureClassName - the class name of a feature to get installed

addFeature

public void addFeature(Feature feature)
Adds another feature's class name to get installed to the configured dialog.


addProperty

public void addProperty(java.lang.String propertyKey,
                        java.lang.Object propertyValue)
Stores a property key-value mapping at this DialogConfiguration.

Parameters:
propertyKey - the property key (not null)
propertyValue - the property value (not null)

setPropertyMap

public void setPropertyMap(java.util.Map propertyMap)
Defines all properties by the given property map.

Parameters:
propertyMap - the property map

configureDialog

public void configureDialog(DialogControl dialogControl,
                            DialogProperties dialogProperties)
                     throws DialogException
Description copied from interface: DialogConfiguration
Initially configures the dialog represented by the given DialogControl. Implementors should set-up the dialog initially; e.g. install Features.

Specified by:
configureDialog in interface DialogConfiguration
Parameters:
dialogControl - the DialogControl to get configured
dialogProperties - the DialogProperties containing static dialog properties
Throws:
DialogException - if the dialog could not be created
See Also:
DialogConfiguration.configureDialog(com.sdm.quasar.client.core.dialog.DialogControl, com.sdm.quasar.client.core.dialog.services.DialogProperties)

getProperty

public java.lang.Object getProperty(java.lang.String propertyKey)
Description copied from interface: DialogProperties
Returns the property value for the given property key.

Specified by:
getProperty in interface DialogProperties
Parameters:
propertyKey - the property key
Returns:
the property value for the given property key (null means, the property is not set)
See Also:
DialogProperties.getProperty(java.lang.String)

collectSystemInfo

public void collectSystemInfo(SystemInfoNode root,
                              SystemInfoOptions options)
Description copied from interface: SystemInfoProvider
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.

Specified by:
collectSystemInfo in interface SystemInfoProvider
Parameters:
root - the SystemInfoNode to add information to (guaranteed to be not null)
options - contains additional options, that might influence the amount of information added to the tree (guaranteed to be not null)
See Also:
SystemInfoProvider.collectSystemInfo(com.sdm.quasar.client.core.common.sysinfo.SystemInfoNode, com.sdm.quasar.client.core.common.sysinfo.SystemInfoOptions)