com.persistent.wizard
Class JWizard

java.lang.Object
  extended bycom.persistent.wizard.JWizardPageTraversal
      extended bycom.persistent.wizard.JWizard
All Implemented Interfaces:
com.persistent.wizard.WizardFunction

public abstract class JWizard
extends com.persistent.wizard.JWizardPageTraversal

This is to Create a Dialog to show the wizard.


Field Summary
 java.lang.String presentPage
           
 
Constructor Summary
JWizard(javax.swing.JFrame frame, java.lang.String wizardName)
           
JWizard(javax.swing.JFrame frame, java.lang.String wizardName, java.awt.Dimension dimension)
          User is allowed to specify his dimentions to resize Wizard.
JWizard(java.lang.String wizardName)
          This is used to create default frame whose size dimentions are 600px X 600 px.
JWizard(java.lang.String wizardName, java.awt.Dimension dimension)
          Creates default JFrame object but allows user to set dimentions of Wizard.
 
Method Summary
 boolean addPage(JPage pageToAdd, java.lang.String name)
          This is to add pages to wizard.
 boolean canFinish()
           
 JPage getNextPage()
          returns the Next page to be displayed.
 JPage getPageByNumber(int number)
          Returns the page with the provided page number.
 JPage getPresentPage()
          This returns the present page displayed in the Wizard.
 java.lang.String getPresentPageName()
          Return the name of the page which is displayed in wizard.
 JPage getPreviousPage()
          Returns the previous page .
 void performCancel()
           
 void performFinish()
           
 void showDialog()
          Once you have added all pages you want to display to the wizard you have to call this to make the wizard visible.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

presentPage

public java.lang.String presentPage
Constructor Detail

JWizard

public JWizard(javax.swing.JFrame frame,
               java.lang.String wizardName)
Parameters:
frame - any JFrame object with whatever properties you want to set for this frame.
wizardName - Name of the wizard. This is displayed as the frame/dialog name.

JWizard

public JWizard(java.lang.String wizardName)
This is used to create default frame whose size dimentions are 600px X 600 px.

Parameters:
wizardName - Name of the wizard. This is displayed as the frame/dialog name.

JWizard

public JWizard(java.lang.String wizardName,
               java.awt.Dimension dimension)
Creates default JFrame object but allows user to set dimentions of Wizard.

Parameters:
wizardName - Name of the wizard. This is displayed as the frame/dialog name.
dimension - Dimentions of the wizard. eg(600pixel X 600pixel)

JWizard

public JWizard(javax.swing.JFrame frame,
               java.lang.String wizardName,
               java.awt.Dimension dimension)
User is allowed to specify his dimentions to resize Wizard.

Parameters:
frame - JFrame object on which you want this wizard to be shown.
wizardName - Name of the wizard. This is displayed as the frame/dialog name.
dimension - Dimentions of the wizard. eg(600pixel X 600pixel)
Method Detail

showDialog

public void showDialog()
Once you have added all pages you want to display to the wizard you have to call this to make the wizard visible.


addPage

public boolean addPage(JPage pageToAdd,
                       java.lang.String name)
This is to add pages to wizard. Pages are called in sequence if you have not set next page name or not overridden getUsersNextPageName() API in his JPage implementation.

Parameters:
pageToAdd - This is object of class extending JPage. This is a page to add to wizard.
name - provide a name to a page to be added.
Returns:
true if page is added successfully and false if fails to add a page.

getNextPage

public JPage getNextPage()
returns the Next page to be displayed.

Specified by:
getNextPage in interface com.persistent.wizard.WizardFunction
Returns:
JPage

getPreviousPage

public JPage getPreviousPage()
Returns the previous page .

Specified by:
getPreviousPage in interface com.persistent.wizard.WizardFunction
Returns:
JPage

getPageByNumber

public JPage getPageByNumber(int number)
Returns the page with the provided page number.

Parameters:
number -
Returns:
JPage

getPresentPage

public JPage getPresentPage()
This returns the present page displayed in the Wizard.

Returns:
JPage

getPresentPageName

public java.lang.String getPresentPageName()
Return the name of the page which is displayed in wizard.

Returns:
String Page name

canFinish

public boolean canFinish()

performFinish

public void performFinish()

performCancel

public void performCancel()