Class StandardPropertyPage

All Implemented Interfaces:
IDialogPage, IMessageProvider, IPreferencePage, IWorkbenchPropertyPage
Direct Known Subclasses:
AliasPropertyPage, TerminalModelPropertyPage

public abstract class StandardPropertyPage extends PropertyPage
The standard property page with a fix for the Apply button and changed-support with saving settings.
Author:
Christopher Mindus
  • Constructor Details

    • StandardPropertyPage

      public StandardPropertyPage()
      Constructor.
  • Method Details

    • createControl

      public final void createControl(Composite parent)
      OVerrides the default to disable Apply button.
      Specified by:
      createControl in interface IDialogPage
      Overrides:
      createControl in class PreferencePage
    • checkSelectedElement

      protected abstract String checkSelectedElement(Object element)
      Initializes the page for the selected object if it's of correct type and contents. If not, return an error message.
      Parameters:
      element - The selected element (normally from the Common Navigator).
      Returns:
      Error message, or null for OK.
    • createContents

      protected Control createContents(Composite parent)
      Specified by:
      createContents in class PreferencePage
      See Also:
    • createContents

      protected abstract void createContents(Composite composite, int parentWidth, int stdButtonWidth)
      The real creator must be overridden. The composite is created with no layout.
      Parameters:
      composite - The composite to fill with controls.
      parentWidth - The parent width.
      stdButtonWidth - The standard button width (Apply, Defaults).
    • saveSettings

      protected abstract boolean saveSettings()
      Save settings. Override to save settings.
      Returns:
      false for failure, OK to keep on going.
    • performApply

      protected final void performApply()
      Performs apply. Cannot be overridden, saves settings if required.
      Overrides:
      performApply in class PreferencePage
    • performOk

      public final boolean performOk()
      Performs OK. Cannot be overridden, saves settings if required.
      Specified by:
      performOk in interface IPreferencePage
      Overrides:
      performOk in class PreferencePage
    • clearChanged

      protected final void clearChanged()
      Clears the change state.
    • setChanged

      protected final void setChanged()
      Sets the change state.
    • updateApplyButton

      protected final void updateApplyButton()
      Overrides the default behavior to updates the enabled state of the Apply button to reflect whether this page is valid.
      Overrides:
      updateApplyButton in class PreferencePage
    • setDefaultsEnabled

      protected void setDefaultsEnabled(boolean on)
      Sets the Defaults button enabled state. If the Defaults button is not created, this method does nothing.