org.esa.beam.framework.ui.config
Class DefaultConfigPage

java.lang.Object
  extended by org.esa.beam.framework.ui.config.DefaultConfigPage
All Implemented Interfaces:
ConfigPage
Direct Known Subclasses:
VisatPreferencesDialog.AppearancePage, VisatPreferencesDialog.BehaviorPage, VisatPreferencesDialog.DataIO, VisatPreferencesDialog.GeolocationDisplayPage, VisatPreferencesDialog.GraticuleOverlayPage, VisatPreferencesDialog.ImageDisplayPage, VisatPreferencesDialog.LayerPropertiesPage, VisatPreferencesDialog.LoggingPage, VisatPreferencesDialog.MaskOverlayPage, VisatPreferencesDialog.NoDataOverlayPage, VisatPreferencesDialog.ProductSettings, VisatPreferencesDialog.RepositoryConnectionConfigPage, VisatPreferencesDialog.RGBImageProfilePage

public class DefaultConfigPage
extends Object
implements ConfigPage

A convinience implementation of the ConfigPage interface.

Version:
$Revision$ $Date$
Author:
Norman Fomferra, Sabine Embacher

Constructor Summary
DefaultConfigPage()
           
 
Method Summary
 void addSubPage(ConfigPage subPage)
           
 void applyPage()
          Applies the modifications made on this page.
 Parameter getConfigParam(String paramName)
           
 ParamGroup getConfigParams()
           
 PropertyMap getConfigParamValues(PropertyMap propertyMap)
           
 Icon getIcon()
          Returns an icon for the page which is displayed in the config dialog's tree view.
 String getKey()
          Returns the key used to identify this page in a multiple page config dialog.
 Component getPageUI()
          Returns the UI component which lets a user edit this page.
 ConfigPage[] getSubPages()
          Returns an array of sub-pages this page has.
 String getTitle()
          Returns the human readable tile of the page which is displayed in the config dialog's tree view and title bar.
protected  void initConfigParams(ParamGroup configParams)
           
protected  void initPageUI()
           
 boolean isConfigParamUIEnabled(String paramName)
           
 boolean isModified()
          Checks whether or not this page has been modified.
 void onOK()
          Called when the config dialog is commited.
 void removeSubPage(ConfigPage subPage)
           
 void restorePage()
          Restores the modifications made on this page.
 void setConfigParamUIEnabled(String paramName, boolean enabled)
           
 void setConfigParamValues(PropertyMap propertyMap, ParamExceptionHandler errorHandler)
           
 void setIcon(Icon icon)
           
 void setModified(boolean modified)
           
 void setPageUI(Component pageUI)
           
 void setTitle(String title)
           
 void updatePageUI()
          Called when the config dialog is set to visible.
 boolean verifyUserInput()
          Verifies whether or not this page is valid or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultConfigPage

public DefaultConfigPage()
Method Detail

initConfigParams

protected void initConfigParams(ParamGroup configParams)

initPageUI

protected void initPageUI()

getConfigParams

public ParamGroup getConfigParams()
Specified by:
getConfigParams in interface ConfigPage

getConfigParamValues

public PropertyMap getConfigParamValues(PropertyMap propertyMap)
Specified by:
getConfigParamValues in interface ConfigPage

setConfigParamValues

public void setConfigParamValues(PropertyMap propertyMap,
                                 ParamExceptionHandler errorHandler)
Specified by:
setConfigParamValues in interface ConfigPage

getConfigParam

public Parameter getConfigParam(String paramName)

isConfigParamUIEnabled

public boolean isConfigParamUIEnabled(String paramName)

setConfigParamUIEnabled

public void setConfigParamUIEnabled(String paramName,
                                    boolean enabled)

getKey

public String getKey()
Description copied from interface: ConfigPage
Returns the key used to identify this page in a multiple page config dialog.

Specified by:
getKey in interface ConfigPage
Returns:
the key, must not be null and unique within the page.

getIcon

public Icon getIcon()
Description copied from interface: ConfigPage
Returns an icon for the page which is displayed in the config dialog's tree view.

Specified by:
getIcon in interface ConfigPage
Returns:
an icon or null if no icon is used

setIcon

public void setIcon(Icon icon)

getTitle

public String getTitle()
Description copied from interface: ConfigPage
Returns the human readable tile of the page which is displayed in the config dialog's tree view and title bar.

Specified by:
getTitle in interface ConfigPage
Returns:
the title, must not be null

setTitle

public void setTitle(String title)

isModified

public boolean isModified()
Description copied from interface: ConfigPage
Checks whether or not this page has been modified.

Specified by:
isModified in interface ConfigPage

setModified

public void setModified(boolean modified)

getPageUI

public Component getPageUI()
Description copied from interface: ConfigPage
Returns the UI component which lets a user edit this page. The component is shown on the right side o the config dialog if a user clicks on this page in the tree view.

Specified by:
getPageUI in interface ConfigPage
Returns:
the UI component, must not be null

setPageUI

public void setPageUI(Component pageUI)

addSubPage

public void addSubPage(ConfigPage subPage)

removeSubPage

public void removeSubPage(ConfigPage subPage)

getSubPages

public ConfigPage[] getSubPages()
Description copied from interface: ConfigPage
Returns an array of sub-pages this page has. Subpages are displayed in the config dialog's tree view as children of this page.

Specified by:
getSubPages in interface ConfigPage
Returns:
an array of sub-pages or null if no sub-pages are used

applyPage

public void applyPage()
Description copied from interface: ConfigPage
Applies the modifications made on this page.

Specified by:
applyPage in interface ConfigPage

restorePage

public void restorePage()
Description copied from interface: ConfigPage
Restores the modifications made on this page.

Specified by:
restorePage in interface ConfigPage

onOK

public void onOK()
Description copied from interface: ConfigPage
Called when the config dialog is commited. All user inputs have already been verified.

Specified by:
onOK in interface ConfigPage

updatePageUI

public void updatePageUI()
Description copied from interface: ConfigPage
Called when the config dialog is set to visible.

Specified by:
updatePageUI in interface ConfigPage

verifyUserInput

public boolean verifyUserInput()
Description copied from interface: ConfigPage
Verifies whether or not this page is valid or not.

Specified by:
verifyUserInput in interface ConfigPage


Copyright © 2002-2013 Brockmann Consult GmbH. All Rights Reserved.