org.springframework.richclient.preference
Class PreferencePage

java.lang.Object
  extended by org.springframework.richclient.application.support.ApplicationServicesAccessor
      extended by org.springframework.richclient.core.LabeledObjectSupport
          extended by org.springframework.richclient.dialog.AbstractDialogPage
              extended by org.springframework.richclient.preference.PreferencePage
All Implemented Interfaces:
PropertyChangePublisher, CommandLabelConfigurable, DescribedElement, DescriptionConfigurable, Guarded, TitleConfigurable, VisualizedElement, DialogPage, Messagable, ControlFactory, IconConfigurable, ImageConfigurable
Direct Known Subclasses:
FormBackedPreferencePage

public abstract class PreferencePage
extends AbstractDialogPage


Field Summary
 
Fields inherited from class org.springframework.richclient.core.LabeledObjectSupport
logger
 
Fields inherited from interface org.springframework.richclient.dialog.DialogPage
DESCRIPTION_PROPERTY, PAGE_COMPLETE_PROPERTY
 
Fields inherited from interface org.springframework.richclient.dialog.Messagable
MESSAGE_PROPERTY
 
Fields inherited from interface org.springframework.richclient.core.DescribedElement
CAPTION_PROPERTY, DESCRIPTION_PROPERTY, DISPLAY_NAME_PROPERTY
 
Constructor Summary
PreferencePage(String id)
           
PreferencePage(String id, boolean autoconfigure)
           
 
Method Summary
protected  JComponent createButtons()
          Creates two commands "Restore defaults" and "Apply" for this page, layouts them on the panel.
protected abstract  JComponent createContents()
           
protected  JComponent createControl()
           
protected  ActionCommand getApplyCommand()
          Will create "Apply" command if it doesn't exist yet
protected  ActionCommand[] getCommands()
           
 boolean getCreateApplyAndDefaultButtons()
           
 PreferencePage getParent()
           
protected  ActionCommand getRestoreDefaultsCommand()
          Will create "Restore Defaults" command if it doesn't exist yet
protected  Settings getSettings()
           
protected  void onApply()
          Must store the preference values in the PreferenceStore.
protected  void onDefaults()
           
protected  boolean onFinish()
          Notification that the user clicked the OK button on the PreferenceDialog.
 void setCreateApplyAndDefaultButtons(boolean create)
           
 void setPageComplete(boolean pageComplete)
           
 void setParent(PreferencePage parent)
           
 void setPreferenceDialog(PreferenceDialog dialog)
           
 
Methods inherited from class org.springframework.richclient.dialog.AbstractDialogPage
getControl, getIcon, getId, getMessage, getParentWindowControl, getTitle, hasErrorMessage, hasInfoMessage, hasWarningMessage, isControlCreated, isEnabled, isPageComplete, isVisible, performHelp, setEnabled, setIcon, setId, setMessage, setVisible
 
Methods inherited from class org.springframework.richclient.core.LabeledObjectSupport
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getAccelerator, getCaption, getDescription, getDisplayName, getImage, getLabel, getMnemonic, getMnemonicIndex, hasChanged, hasChanged, hasChanged, removePropertyChangeListener, removePropertyChangeListener, setCaption, setDescription, setImage, setLabelInfo, setTitle, toString
 
Methods inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor
getActiveWindow, getApplication, getApplicationContext, getApplicationName, getApplicationServices, getCommandConfigurer, getComponentFactory, getConversionService, getIconSource, getImageSource, getMessage, getMessage, getMessage, getMessage, getMessages, getMessageSource, getObjectConfigurer, getService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.richclient.dialog.DialogPage
getDescription, getImage
 
Methods inherited from interface org.springframework.binding.value.PropertyChangePublisher
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 

Constructor Detail

PreferencePage

public PreferencePage(String id)

PreferencePage

public PreferencePage(String id,
                      boolean autoconfigure)
Method Detail

getCommands

protected ActionCommand[] getCommands()
Returns:
array containing "Restore defaults" and "Apply" commands

getApplyCommand

protected ActionCommand getApplyCommand()
Will create "Apply" command if it doesn't exist yet

Returns:
apply command.

getRestoreDefaultsCommand

protected ActionCommand getRestoreDefaultsCommand()
Will create "Restore Defaults" command if it doesn't exist yet

Returns:
restore defaults command.

createButtons

protected JComponent createButtons()
Creates two commands "Restore defaults" and "Apply" for this page, layouts them on the panel.

Returns:
panel containing "Restore defaults" and "Apply" commands

createContents

protected abstract JComponent createContents()

createControl

protected JComponent createControl()
Specified by:
createControl in class AbstractDialogPage

getParent

public PreferencePage getParent()

getSettings

protected Settings getSettings()

onApply

protected void onApply()
Must store the preference values in the PreferenceStore. Does not save the PreferenceStore. Subclasses should override this method.


onDefaults

protected void onDefaults()

onFinish

protected boolean onFinish()
Notification that the user clicked the OK button on the PreferenceDialog.


setCreateApplyAndDefaultButtons

public void setCreateApplyAndDefaultButtons(boolean create)

getCreateApplyAndDefaultButtons

public boolean getCreateApplyAndDefaultButtons()

setParent

public void setParent(PreferencePage parent)

setPreferenceDialog

public void setPreferenceDialog(PreferenceDialog dialog)

setPageComplete

public void setPageComplete(boolean pageComplete)
Overrides:
setPageComplete in class AbstractDialogPage


Copyright © 2004-2008 The Spring Framework. All Rights Reserved.