## com.ibm.lab.soln.dialogs
Class MyPrefPageBasic

    java.lang.Object
      |
      +--org.eclipse.jface.dialogs.DialogPage
            |
            +--org.eclipse.jface.preference.PreferencePage
                  |
                  +--com.ibm.lab.soln.dialogs.MyPrefPageBasic

All Implemented Interfaces:
  org.eclipse.jface.dialogs.IDialogPage, org.eclipse.jface.dialogs.IMessageProvider, org.eclipse.jface.preference.IPreferencePage, org.eclipse.ui.IWorkbenchPreferencePage

public class MyPrefPageBasic
extends org.eclipse.jface.preference.PreferencePage
implements org.eclipse.ui.IWorkbenchPreferencePage

Custom preference page implementation. Uses the `Plugin` API to access the `Preferences` object for storing preference values.

Preference keys are defined in the `IDialogsIDs` interface.

Defaults for preference key values are defined as part of the Dialogs plug-in.

See Also:
  `DialogsPlugin.initializeDefaultPreferences(org.eclipse.jface.preference.IPreferenceStore)`, `IDialogsIDs`, `PreferencePage`, `Preferences`

Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
`ERROR, INFORMATION, NONE, WARNING`

Constructor Summary
`MyPrefPageBasic()` Default constructor.

Method Summary
`protected org.eclipse.swt.widgets.Control` | `createContents(org.eclipse.swt.widgets.Composite parent)` Implement the user interface for the preference page.
`void` | `init(org.eclipse.ui.IWorkbench workbench)` Initializes the preference page by getting a local reference to the `Preferences` object from the `DialogsPlugin`.
`protected void` | `performApply()` Can be used to implement any special processing, such as notification, if required.
`boolean` | `performCancel()` Can be used to implement any cleanup processing that may be required.
`protected void` | `performDefaults()` Used to retrieve and set defaults for the preferences that are displayed as part of this page.
`boolean` | `performOk()` Saves preference values for the current page.
`void` | `setVisible(boolean visible)` Method triggered as page is entered and exited.

Methods inherited from class org.eclipse.jface.preference.PreferencePage
`computeSize, contributeButtons, createControl, createDescriptionLabel, doComputeSize, doGetPreferenceStore, getContainer, getPreferenceStore, isValid, noDefaultAndApplyButton, okToLeave, setContainer, setErrorMessage, setMessage, setPreferenceStore, setSize, setTitle, setValid, toString, updateApplyButton`

Methods inherited from class org.eclipse.jface.dialogs.DialogPage
`convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getImage, getMessage, getMessageType, getShell, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, 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, setContainer, setSize`

Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage
`createControl, dispose, getControl, getDescription, getErrorMessage, getImage, getMessage, getTitle, performHelp, setDescription, setImageDescriptor, setTitle`

Constructor Detail

### MyPrefPageBasic

    public MyPrefPageBasic()

  Default constructor.

Method Detail

### createContents

    protected org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent)

  Implement the user interface for the preference page. Returns a control that should be used as the main control for the page.

  User interface defined here supports the definition of preference settings used by the Recent Edits marker creation and management logic.

  Overrides:
    `createContents` in class `org.eclipse.jface.preference.PreferencePage`
  See Also:
    `PreferencePage.createContents(Composite)`

### init

    public void init(org.eclipse.ui.IWorkbench workbench)

  Initializes the preference page by getting a local reference to the `Preferences` object from the `DialogsPlugin`.
  Specified by:
    `init` in interface `org.eclipse.ui.IWorkbenchPreferencePage`
  See Also:
    `IWorkbenchPreferencePage.init(IWorkbench)`

### performApply

    protected void performApply()

  Can be used to implement any special processing, such as notification, if required. Logic to actually change preference values should be in the `performOk` method as that method will also be triggered when the Apply push button is selected.

  If others are interested in tracking preference changes they can use the `addPropertyChangeListener` method available for for an `IPreferenceStore` or `Preferences`.

  Overrides:
    `performApply` in class `org.eclipse.jface.preference.PreferencePage`
  See Also:
    `PreferencePage.performApply()`, `IPreferenceStore.addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)`, `Preferences.addPropertyChangeListener(org.eclipse.core.runtime.Preferences.IPropertyChangeListener)`, `IPropertyChangeListener`

### performCancel

    public boolean performCancel()

  Can be used to implement any cleanup processing that may be required.
  Specified by:
    `performCancel` in interface `org.eclipse.jface.preference.IPreferencePage`
  Overrides:
    `performCancel` in class `org.eclipse.jface.preference.PreferencePage`
  See Also:
    `PreferencePage.performCancel()`

### performDefaults

    protected void performDefaults()

  Used to retrieve and set defaults for the preferences that are displayed as part of this page. Defaults for preference key values are defined as part of the Dialogs plug-in.
  Overrides:
    `performDefaults` in class `org.eclipse.jface.preference.PreferencePage`
  See Also:
    `DialogsPlugin.initializeDefaultPreferences(org.eclipse.jface.preference.IPreferenceStore)`, `PreferencePage.performDefaults()`

### performOk

    public boolean performOk()

  Saves preference values for the current page. This method is triggered when either the Apply or Ok push button has been selected.
  Specified by:
    `performOk` in interface `org.eclipse.jface.preference.IPreferencePage`
  Overrides:
    `performOk` in class `org.eclipse.jface.preference.PreferencePage`
  See Also:
    `PreferencePage.performOk()`

### setVisible

    public void setVisible(boolean visible)

  Method triggered as page is entered and exited. Overridden here to add `traceMsg` support to help visualize the processing for a preference page.
  Specified by:
    `setVisible` in interface `org.eclipse.jface.dialogs.IDialogPage`
  Overrides:
    `setVisible` in class `org.eclipse.jface.dialogs.DialogPage`
  See Also:
    `DialogPage.setVisible(boolean)`