SWT LPEX
v3.0.5

com.ibm.lpex.alef.preferences
Class SavePreferencePage

java.lang.Object
  extended byorg.eclipse.jface.dialogs.DialogPage
      extended byorg.eclipse.jface.preference.PreferencePage
          extended byorg.eclipse.jface.preference.FieldEditorPreferencePage
              extended bycom.ibm.lpex.alef.preferences.LpexFieldEditorPreferencePage
                  extended bycom.ibm.lpex.alef.preferences.SavePreferencePage
All Implemented Interfaces:
EventListener, IDialogPage, IMessageProvider, IPreferencePage, IPropertyChangeListener, IWorkbenchPreferencePage
Direct Known Subclasses:
ViewBasePreferencePage

public class SavePreferencePage
extends LpexFieldEditorPreferencePage

Preference page with save-related settings for one LPEX view, or default settings for the editor.

When the constructor is passed a non-null LpexView, an LPEX view preference page (rather than a global-settings preference page) is created, which handles the save settings for the particular view.


Field Summary
protected  com.ibm.lpex.alef.preferences.LpexIntegerFieldEditor _textLimitTextField
           
protected  com.ibm.lpex.alef.preferences.LpexBooleanFieldEditor _trimCheckBox
           
 
Fields inherited from class org.eclipse.jface.preference.FieldEditorPreferencePage
FLAT, GRID, MARGIN_HEIGHT, MARGIN_WIDTH, VERTICAL_SPACING
 
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
SavePreferencePage()
          Preference-page constructor for default save-related settings.
SavePreferencePage(LpexView lpexView)
          Preference-page constructor for one LPEX view's save settings.
 
Method Summary
protected  Control createContents(Composite parent)
          Creates and returns the SWT control for the customized body of this preference page.
protected  void createFieldEditors()
          Creates this preference page's field editors.
protected  void performDefaults()
          "Restore Defaults" button pressed.
 boolean performOk()
          "OK" / "Apply" button pressed.
protected  void performReset()
          "Reset" button pressed.
 
Methods inherited from class com.ibm.lpex.alef.preferences.LpexFieldEditorPreferencePage
contributeButtons, fieldEditorsCreated, init
 
Methods inherited from class org.eclipse.jface.preference.FieldEditorPreferencePage
addField, adjustGridLayout, applyFont, checkState, dispose, getFieldEditorParent, initialize, propertyChange, setVisible
 
Methods inherited from class org.eclipse.jface.preference.PreferencePage
applyDialogFont, computeSize, createControl, createDescriptionLabel, createNoteComposite, doComputeSize, doGetPreferenceStore, getApplyButton, getContainer, getDefaultsButton, getPreferenceStore, isValid, noDefaultAndApplyButton, okToLeave, performApply, performCancel, performHelp, setContainer, setErrorMessage, setMessage, setPreferenceStore, setSize, setTitle, setValid, toString, updateApplyButton
 
Methods inherited from class org.eclipse.jface.dialogs.DialogPage
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getImage, getMessage, getMessageType, getShell, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, setButtonLayoutData, setControl, setDescription, setImageDescriptor, setMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.preference.IPreferencePage
computeSize, isValid, okToLeave, performCancel, setContainer, setSize
 
Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage
createControl, dispose, getControl, getDescription, getErrorMessage, getImage, getMessage, getTitle, performHelp, setDescription, setImageDescriptor, setTitle, setVisible
 

Field Detail

_trimCheckBox

protected com.ibm.lpex.alef.preferences.LpexBooleanFieldEditor _trimCheckBox

_textLimitTextField

protected com.ibm.lpex.alef.preferences.LpexIntegerFieldEditor _textLimitTextField
Constructor Detail

SavePreferencePage

public SavePreferencePage(LpexView lpexView)
Preference-page constructor for one LPEX view's save settings. This is currently the base preference page of an LPEX view.


SavePreferencePage

public SavePreferencePage()
Preference-page constructor for default save-related settings.

Method Detail

createContents

protected Control createContents(Composite parent)
Creates and returns the SWT control for the customized body of this preference page. Overridden in order to set the context help.


createFieldEditors

protected void createFieldEditors()
Creates this preference page's field editors.

Method fieldEditorsCreated() is called after the fields of this preference page are created and set to their initial values. One or both of the fields may then be disabled by a subclass:

   _trimCheckBox.setEnabled(false);
   _textLimitTextField.setEnabled(false);


performOk

public boolean performOk()
"OK" / "Apply" button pressed. Commits any new updated values.


performDefaults

protected void performDefaults()
"Restore Defaults" button pressed. Sets all the values and the dialog fields to the editor install settings, does a checkState() to recalculate page's error state.


performReset

protected void performReset()
"Reset" button pressed. Restores the initial preference page settings.

Overrides:
performReset in class LpexFieldEditorPreferencePage
See Also:
LpexFieldEditorPreferencePage.contributeButtons(org.eclipse.swt.widgets.Composite)

SWT LPEX
v3.0.5

(C) Copyright IBM Corporation 1998, 2005.  All Rights Reserved.