SWT LPEX
v3.0.5

com.ibm.lpex.alef.preferences
Class AppearancePreferencePage

java.lang.Object
  extended byorg.eclipse.jface.dialogs.DialogPage
      extended byorg.eclipse.jface.preference.PreferencePage
          extended bycom.ibm.lpex.alef.preferences.AppearancePreferencePage
All Implemented Interfaces:
IDialogPage, IMessageProvider, IPreferencePage, IWorkbenchPreferencePage

public final class AppearancePreferencePage
extends PreferencePage
implements IWorkbenchPreferencePage

Preference page for LPEX's default palette, font, and style settings.


Field Summary
 
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
AppearancePreferencePage()
          Default constructor.
 
Method Summary
protected  void contributeButtons(Composite buttonBar)
          Contributes a "Reset" button.
protected  Control createContents(Composite ancestor)
          Creates and returns the SWT control for the customized body of this preference page under the given Composite.
 void init(IWorkbench workbench)
          Initializes this preference page for the given workbench.
protected  void performDefaults()
          "Restore Defaults" button pressed.
 boolean performOk()
          "OK" / "Apply" button pressed.
protected  void performReset()
          "Reset" button pressed.
 void setVisible(boolean visible)
          Sets the visibility of this dialog page.
 
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, dispose, 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
 

Constructor Detail

AppearancePreferencePage

public AppearancePreferencePage()
Default constructor.

Method Detail

createContents

protected Control createContents(Composite ancestor)
Creates and returns the SWT control for the customized body of this preference page under the given Composite.

See Also:
PreferencePage.createContents(Composite)

init

public void init(IWorkbench workbench)
Initializes this preference page for the given workbench. This method, defined by IWorkbenchPreferencePage, is called automatically when the preference page defined in plugin.xml is being created and initialized.

The AppearancePreferencePage implementation of this method does nothing.

Specified by:
init in interface IWorkbenchPreferencePage

contributeButtons

protected void contributeButtons(Composite buttonBar)
Contributes a "Reset" button. Method performReset() is called when this button is selected.

Parameters:
buttonBar - the preference-page button bar
See Also:
PreferencePage.contributeButtons(org.eclipse.swt.widgets.Composite), performReset()

performDefaults

protected void performDefaults()
"Restore Defaults" button pressed. Sets all the values and the dialog fields to the editor install settings.


performReset

protected void performReset()
"Reset" button pressed. Sets all the values and the dialog fields to the initial preference-page settings.


performOk

public boolean performOk()
"OK" / "Apply" button pressed. Commits any new updated values, and ensures that any changes are reflected correctly on all the LPEX screens which have default settings for these.

Specified by:
performOk in interface IPreferencePage

setVisible

public void setVisible(boolean visible)
Sets the visibility of this dialog page. Extended in order to refresh the preview screen each time this page is made visible.

Specified by:
setVisible in interface IDialogPage

SWT LPEX
v3.0.5

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