Class JPage

    • Field Detail

      • FINISH

        public static final String FINISH
        Used to indicate that we are done and the wizard should close
        See Also:
        Constant Field Values
      • pageIdentifier

        protected String pageIdentifier
        Identifier used to track this page in a work flow.
      • backPageIdentifier

        protected String backPageIdentifier
      • nextPageIdentifier

        protected String nextPageIdentifier
    • Constructor Detail

      • JPage

        public JPage()
        Create a default page.
      • JPage

        public JPage​(String id)
        Create a page with the provided id.
    • Method Detail

      • getPanel

        public final JPanel getPanel()
        Access the JPanel - init will be used to create the panel the first time this method is called.
        Returns:
        JPanel used for this wizard page
      • getPageIdentifier

        public String getPageIdentifier()
      • setPageIdentifier

        public void setPageIdentifier​(String pageIdentifier)
      • getJWizard

        public final JWizard getJWizard()
      • getNextPageIdentifier

        public String getNextPageIdentifier()
        Identifier of the panel to use Next.
        Returns:
        Return id of the next JProcessPage or null if next should be disabled. You can use FINISH to indicate the wizard is complete and may be closed.
      • setNextPageIdentifier

        public void setNextPageIdentifier​(String nextPageIdentifier)
      • getBackPageIdentifier

        public String getBackPageIdentifier()
        Identifier of the panel to use Back.
        Returns:
        Return id of the next JProcessPage or null if next should be disabled.
      • setBackPageIdentifier

        public void setBackPageIdentifier​(String backPageIdentifier)
      • createPanel

        public JPanel createPanel()
        Called to initialize the page for the first time.

        Please note this method will normally only be called once; even if the user clicks forwards and backwards to return to your page. It is only called if getPanel() returns null.

        Calling this method directly will erase any previously constructed panel.

      • preDisplayPanel

        public void preDisplayPanel()
        Called just before the panel is to be displayed.

        This is a good time to populate your fields with values; hook up any listeners and gernally muck about.

      • postDisplayPanel

        public void postDisplayPanel()
        Called just after the panel is displayed.

        This is a good time to perform any animations or set the focus into one of the fields etc.

      • isValid

        public boolean isValid()
        Validation of page state; if the page isValid then the next or finish button will be enabled.

        If you need to call setNextPageIdentifier based on input this is the time to do it.

        Returns:
        true if the page contents are valid
      • preClosePanel

        public void preClosePanel()
        Override this method to perform functionality just before the panel is to be hidden.
      • dispose

        public void dispose()
        Called when the workflow is completed (either in Finish, Canel or Error) giving the page a chance to clean up any resources it is using such as a database connection.