java.lang.Object | +--org.eclipse.jface.dialogs.DialogPage | +--org.eclipse.jface.preference.PreferencePage | +--com.ibm.lab.soln.dialogs.MyPrefPageBasic
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.
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 |
public MyPrefPageBasic()
Method Detail |
protected org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent)
User interface defined here supports the definition of preference settings used by the Recent Edits marker creation and management logic.
createContents
in class org.eclipse.jface.preference.PreferencePage
PreferencePage.createContents(Composite)
public void init(org.eclipse.ui.IWorkbench workbench)
Preferences
object from the DialogsPlugin
.init
in interface org.eclipse.ui.IWorkbenchPreferencePage
IWorkbenchPreferencePage.init(IWorkbench)
protected void performApply()
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
.
performApply
in class org.eclipse.jface.preference.PreferencePage
PreferencePage.performApply()
,
IPreferenceStore.addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
,
Preferences.addPropertyChangeListener(org.eclipse.core.runtime.Preferences.IPropertyChangeListener)
,
IPropertyChangeListener
public boolean performCancel()
performCancel
in interface org.eclipse.jface.preference.IPreferencePage
performCancel
in class org.eclipse.jface.preference.PreferencePage
PreferencePage.performCancel()
protected void performDefaults()
performDefaults
in class org.eclipse.jface.preference.PreferencePage
DialogsPlugin.initializeDefaultPreferences(org.eclipse.jface.preference.IPreferenceStore)
,
PreferencePage.performDefaults()
public boolean performOk()
performOk
in interface org.eclipse.jface.preference.IPreferencePage
performOk
in class org.eclipse.jface.preference.PreferencePage
PreferencePage.performOk()
public void setVisible(boolean visible)
traceMsg
support to help visualize the processing for a
preference page.setVisible
in interface org.eclipse.jface.dialogs.IDialogPage
setVisible
in class org.eclipse.jface.dialogs.DialogPage
DialogPage.setVisible(boolean)