java.lang.Object | +--org.eclipse.jface.dialogs.DialogPage | +--org.eclipse.jface.preference.PreferencePage | +--com.ibm.lab.soln.dialogs.MyPrefPageControl
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 | |
MyPrefPageControl()
Default constructor. |
Method Summary | |
void |
addPrefListenerToggle(org.eclipse.swt.widgets.Group group)
Adds a toggle button to the user interface and implements logic to add and remove a change listener that will report preference setting changes. |
void |
addSavePrefsButton(org.eclipse.swt.widgets.Group group)
Adds a button to the user interface and implements logic to save the plug-in's preference store when selected. |
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 . |
void |
resultInformation(java.lang.String title,
java.lang.String msg)
Uses a MessageDialog to show action results. |
Methods inherited from class org.eclipse.jface.preference.PreferencePage |
computeSize, contributeButtons, createControl, createDescriptionLabel, doComputeSize, doGetPreferenceStore, getContainer, getPreferenceStore, isValid, noDefaultAndApplyButton, okToLeave, performApply, performCancel, performDefaults, performOk, 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, setVisible |
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, performOk, setContainer, setSize |
Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage |
createControl, dispose, getControl, getDescription, getErrorMessage, getImage, getMessage, getTitle, performHelp, setDescription, setImageDescriptor, setTitle, setVisible |
Constructor Detail |
public MyPrefPageControl()
Method Detail |
public void addPrefListenerToggle(org.eclipse.swt.widgets.Group group)
group
- public void addSavePrefsButton(org.eclipse.swt.widgets.Group group)
group
- protected org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent)
User interface defined here adds enable/disable support for a change listener that reports preference setting changes and the ability to force a save of the current preference store.
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)
public void resultInformation(java.lang.String title, java.lang.String msg)
MessageDialog
to show action results.MessageDialog