Class AbstractDataBoundWizardPage

  • All Implemented Interfaces:
    org.eclipse.jface.dialogs.IDialogPage, org.eclipse.jface.dialogs.IMessageProvider, org.eclipse.jface.wizard.IWizardPage
    Direct Known Subclasses:
    RuntimeInstallationWizardPage

    public abstract class AbstractDataBoundWizardPage
    extends org.eclipse.jface.wizard.WizardPage
    Abstract implementation of WizardPage with JFace data binding support.
    • Field Summary

      • Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider

        ERROR, INFORMATION, NONE, WARNING
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected void afterCreateControl()
      Convenience method, invoked after full UI creation and binding.
      protected void bind​(org.eclipse.core.databinding.DataBindingContext databindingContext)
      Bind UI elements.
      protected boolean browseDirectory​(org.eclipse.swt.widgets.Text text, String message)
      Browse directory and set the given Text with the returned value.
      protected boolean browseFile​(org.eclipse.swt.widgets.Combo combo, String message, String[] filterExtensions, String[] filterNames, int style)
      Browse file and set the given Combo with the returned value.
      protected boolean browseFile​(org.eclipse.swt.widgets.Text text, String message, String[] filterExtensions)
      Browse file and set the given Text with the returned value.
      protected boolean browseFile​(org.eclipse.swt.widgets.Text text, String message, String[] filterExtensions, String[] filterNames)
      Browse file and set the given Text with the returned value.
      protected boolean browseFile​(org.eclipse.swt.widgets.Text text, String message, String[] filterExtensions, String[] filterNames, int style)
      Browse file and set the given Text with the returned value.
      void createControl​(org.eclipse.swt.widgets.Composite parent)  
      void dispose()  
      protected abstract org.eclipse.swt.widgets.Composite doCreateControl​(org.eclipse.swt.widgets.Composite parent)
      Create page control and return it's composite.
      protected org.eclipse.core.databinding.DataBindingContext getDataBindingContext()
      Returns data binding context of this page.
      String getHelpContextId()
      Returns help context id to bind help to.
      protected void setValidationMessageProvider​(org.eclipse.jface.databinding.dialog.IValidationMessageProvider provider)
      Sets validation message provider for the page.
      • Methods inherited from class org.eclipse.jface.wizard.WizardPage

        canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getNextPage, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString
      • Methods inherited from class org.eclipse.jface.dialogs.DialogPage

        convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage, setVisible
      • Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage

        getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp, setVisible
    • Constructor Detail

      • AbstractDataBoundWizardPage

        protected AbstractDataBoundWizardPage​(String pageName)
        Parameters:
        pageName - page name, cannot be null
    • Method Detail

      • createControl

        public void createControl​(org.eclipse.swt.widgets.Composite parent)
      • getHelpContextId

        public String getHelpContextId()
        Returns help context id to bind help to.
        Returns:
        help context id or null if no help is needed
      • dispose

        public void dispose()
        Specified by:
        dispose in interface org.eclipse.jface.dialogs.IDialogPage
        Overrides:
        dispose in class org.eclipse.jface.dialogs.DialogPage
      • doCreateControl

        protected abstract org.eclipse.swt.widgets.Composite doCreateControl​(org.eclipse.swt.widgets.Composite parent)
        Create page control and return it's composite. Subclass must add UI elements in this method.
        Parameters:
        parent - parent composite, cannot be null
        Returns:
        return child composite, to set control to, never null
      • afterCreateControl

        protected void afterCreateControl()
        Convenience method, invoked after full UI creation and binding. Default implementation does nothing. Subclass can override.
      • bind

        protected void bind​(org.eclipse.core.databinding.DataBindingContext databindingContext)
        Bind UI elements. Default implementation does nothing.
        Parameters:
        databindingContext - databinding context to bind to, cannot be null
      • getDataBindingContext

        protected org.eclipse.core.databinding.DataBindingContext getDataBindingContext()
        Returns data binding context of this page.
        Returns:
        data binding context of this page, never null
      • setValidationMessageProvider

        protected void setValidationMessageProvider​(org.eclipse.jface.databinding.dialog.IValidationMessageProvider provider)
        Sets validation message provider for the page. It is used for providing the message text and message type to display on the dialog page.
        Parameters:
        provider - the validation message provider, cannot be null
        See Also:
        DialogPageSupport.setValidationMessageProvider(IValidationMessageProvider)
      • browseFile

        protected boolean browseFile​(org.eclipse.swt.widgets.Text text,
                                     String message,
                                     String[] filterExtensions)
        Browse file and set the given Text with the returned value. Initial path value will be equals to Text.getText().
        Returns whether the text was set in a result of method execution.

        This method is equals to: browseFile(text, message, filterExtensions, null).

        Parameters:
        text - the Text to get and set path, cannot be null
        message - the browse file dialog message, cannot be null
        filterExtensions - the file extensions which the dialog will use to filter the files or null if not needed
        Returns:
        whether the text was set in a result of method execution
      • browseFile

        protected boolean browseFile​(org.eclipse.swt.widgets.Text text,
                                     String message,
                                     String[] filterExtensions,
                                     String[] filterNames)
        Browse file and set the given Text with the returned value. Initial path value will be equals to Text.getText().
        Returns whether the text was set in a result of method execution.

        This method is equals to: browseFile(text, message, filterExtensions, filterNames, SWT.SAVE).

        Parameters:
        text - the Text to get and set path, cannot be null
        message - the browse file dialog message, cannot be null
        filterExtensions - the file extensions which the dialog will use to filter the files or null if not needed
        filterNames - the names that describe the filter extensions or null if not needed
        Returns:
        whether the text was set in a result of method execution
      • browseFile

        protected boolean browseFile​(org.eclipse.swt.widgets.Text text,
                                     String message,
                                     String[] filterExtensions,
                                     String[] filterNames,
                                     int style)
        Browse file and set the given Text with the returned value. Initial path value will be equals to Text.getText().
        Returns whether the text was set in a result of method execution.
        Parameters:
        text - the Text to get and set path, cannot be null
        message - the browse file dialog message, cannot be null
        filterExtensions - the file extensions which the dialog will use to filter the files or null if not needed
        filterNames - the names that describe the filter extensions or null if not needed
        style - SWT file dialog style
        Returns:
        whether the text was set in a result of method execution
      • browseFile

        protected boolean browseFile​(org.eclipse.swt.widgets.Combo combo,
                                     String message,
                                     String[] filterExtensions,
                                     String[] filterNames,
                                     int style)
        Browse file and set the given Combo with the returned value. Initial path value will be equals to Combo.getText().
        Returns whether the text was set in a result of method execution.
        Parameters:
        combo - the Combo to get and set path, cannot be null
        message - the browse file dialog message, cannot be null
        filterExtensions - the file extensions which the dialog will use to filter the files or null if not needed
        filterNames - the names that describe the filter extensions or null if not needed
        style - SWT file dialog style
        Returns:
        whether the text was set in a result of method execution
      • browseDirectory

        protected boolean browseDirectory​(org.eclipse.swt.widgets.Text text,
                                          String message)
        Browse directory and set the given Text with the returned value. Initial path value will be equals to Text.getText() or its parent directory.

        Returns whether the text was set in a result of method execution.

        Parameters:
        text - the Text to get and set path, cannot be null
        message - the browse directory dialog message, cannot be null
        Returns:
        whether the text was set in a result of method execution