Class DefaultWizardModel

    • Constructor Detail

      • DefaultWizardModel

        public DefaultWizardModel()
        Creates a default wizard model with no pages. The user must call setPages(javax.swing.JComponent[]) before using the model.
      • DefaultWizardModel

        public DefaultWizardModel​(javax.swing.JComponent[] pages)
        Creates a default wizard model with an initial set of pages.
        Parameters:
        pages - the page list
        Throws:
        java.lang.NullPointerException - if pages is null
    • Method Detail

      • setPages

        public void setPages​(javax.swing.JComponent[] pages)
        Sets the list of fixed pages to be used by the model. This does not reset the page order, so it can be used to create non-linear page structures. For example, depending on the controls selected by the user, you could set an alternate page order that diverges after the current page.
        Parameters:
        pages - the page list
        Throws:
        java.lang.NullPointerException - if pages is null
      • getPages

        public final javax.swing.JComponent[] getPages()
        Returns the current page order. This is identical to calling getPageOrder(); this method is provided for symmetry with setPages(javax.swing.JComponent[]).
        Returns:
        the current page order, or null if no pages have been set
      • getPageOrder

        public javax.swing.JComponent[] getPageOrder()
        Description copied from interface: WizardModel
        Returns the current order of pages in the wizard. This method is called to set up the panel and before each page transition. This allows the model to change the page order in response to user choices.

        Unless otherwise stated, the caller must assume that the returned array should be considered immutable. Changing the values of elements in the array is forbidden.

        Returns:
        an array of components (typically panels) in the order they should be displayed