Class WizardPage

    • Constructor Detail

      • WizardPage

        protected WizardPage​(String pageName)
        Creates a new wizard page with the given name, and with no title or image.
        Parameters:
        pageName - the name of the page
      • WizardPage

        protected WizardPage​(String pageName,
                             String title,
                             ImageDescriptor titleImage)
        Creates a new wizard page with the given name, title, and image.
        Parameters:
        pageName - the name of the page
        title - the title for this wizard page, or null if none
        titleImage - the image descriptor for the title of this wizard page, or null if none
    • Method Detail

      • canFlipToNextPage

        public boolean canFlipToNextPage()
        The WizardPage implementation of this IWizardPage method returns true if this page is complete (isPageComplete) and there is a next page to flip to. Subclasses may override (extend or reimplement).
        Specified by:
        canFlipToNextPage in interface IWizardPage
        Returns:
        true if the next page could be displayed, and false otherwise
        See Also:
        getNextPage(), isPageComplete()
      • getContainer

        protected IWizardContainer getContainer()
        Returns the wizard container for this wizard page.
        Returns:
        the wizard container, or null if this wizard page has yet to be added to a wizard, or the wizard has yet to be added to a container
      • getDialogSettings

        protected IDialogSettings getDialogSettings()
        Returns the dialog settings for this wizard page.
        Returns:
        the dialog settings, or null if none
      • getImage

        public Image getImage()
        Description copied from interface: IDialogPage
        Returns this dialog page's image.
        Specified by:
        getImage in interface IDialogPage
        Overrides:
        getImage in class DialogPage
        Returns:
        the image for this dialog page, or null if none
      • getName

        public String getName()
        Description copied from interface: IWizardPage
        Returns this page's name.
        Specified by:
        getName in interface IWizardPage
        Returns:
        the name of this page
      • getNextPage

        public IWizardPage getNextPage()
        Description copied from interface: IWizardPage
        Returns the wizard page that would to be shown if the user was to press the Next button.
        Specified by:
        getNextPage in interface IWizardPage
        Returns:
        the next wizard page, or null if none
      • getPreviousPage

        public IWizardPage getPreviousPage()
        Description copied from interface: IWizardPage
        Returns the wizard page that would to be shown if the user was to press the Back button.
        Specified by:
        getPreviousPage in interface IWizardPage
        Returns:
        the previous wizard page, or null if none
      • getShell

        public Shell getShell()
        The WizardPage implementation of this method declared on DialogPage returns the shell of the container. The advantage of this implementation is that the shell is accessable once the container is created even though this page's control may not yet be created.
        Overrides:
        getShell in class DialogPage
        Returns:
        the shell
      • isCurrentPage

        protected boolean isCurrentPage()
        Returns whether this page is the current one in the wizard's container.
        Returns:
        true if the page is active, and false otherwise
      • isPageComplete

        public boolean isPageComplete()
        The WizardPage implementation of this IWizard method returns the value of an internal state variable set by setPageComplete. Subclasses may extend.
        Specified by:
        isPageComplete in interface IWizardPage
        Returns:
        true if this page is complete, and false otherwise
      • setDescription

        public void setDescription​(String description)
        The WizardPage implementation of this IDialogPage method extends the DialogPage implementation to update the wizard container title bar. Subclasses may extend.
        Specified by:
        setDescription in interface IDialogPage
        Overrides:
        setDescription in class DialogPage
        Parameters:
        description - the description text for this dialog page, or null if none
      • setErrorMessage

        public void setErrorMessage​(String newMessage)
        The WizardPage implementation of this method declared on DialogPage updates the container if this is the current page.
        Overrides:
        setErrorMessage in class DialogPage
        Parameters:
        newMessage - the message, or null to clear the error message
      • setImageDescriptor

        public void setImageDescriptor​(ImageDescriptor image)
        The WizardPage implementation of this method declared on DialogPage updates the container if this page is the current page.
        Specified by:
        setImageDescriptor in interface IDialogPage
        Overrides:
        setImageDescriptor in class DialogPage
        Parameters:
        image - the image for this dialog page, or null if none
      • setMessage

        public void setMessage​(String newMessage,
                               int newType)
        The WizardPage implementation of this method declared on DialogPage updates the container if this is the current page.
        Overrides:
        setMessage in class DialogPage
        Parameters:
        newMessage - the message, or null to clear the message
        newType - the message type
      • setPageComplete

        public void setPageComplete​(boolean complete)
        Sets whether this page is complete.

        This information is typically used by the wizard to decide when it is okay to move on to the next page or finish up.

        Parameters:
        complete - true if this page is complete, and and false otherwise
        See Also:
        isPageComplete()
      • setPreviousPage

        public void setPreviousPage​(IWizardPage page)
        Description copied from interface: IWizardPage
        Sets the wizard page that would typically be shown if the user was to press the Back button.

        This method is called by the container.

        Specified by:
        setPreviousPage in interface IWizardPage
        Parameters:
        page - the previous wizard page
      • setTitle

        public void setTitle​(String title)
        The WizardPage implementation of this IDialogPage method extends the DialogPage implementation to update the wizard container title bar. Subclasses may extend.
        Specified by:
        setTitle in interface IDialogPage
        Overrides:
        setTitle in class DialogPage
        Parameters:
        title - the title of this dialog page, or null if none
      • setWizard

        public void setWizard​(IWizard newWizard)
        Description copied from interface: IWizardPage
        Sets the wizard that hosts this wizard page. Once established, a page's wizard cannot be changed to a different wizard.
        Specified by:
        setWizard in interface IWizardPage
        Parameters:
        newWizard - the wizard
        See Also:
        IWizardPage.getWizard()
      • toString

        public String toString()
        Returns a printable representation of this wizard page suitable only for debug purposes.
        Overrides:
        toString in class Object