|
|||||||||
| Home >> All >> allensoft >> [ gui overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
allensoft.gui
Class Wizard

java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
allensoft.gui.EscapeDialog
allensoft.gui.Wizard
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants
- public class Wizard
- extends EscapeDialog
A Wizard is a dialog that guides the user through a series of steps they must perform to accomplish a task. Each step is represented by a page. When the user has finished with a page they can use the "Next" button to advance to the next page. Once all pages have been completed they can click on the finish button to complete the wizard process.
| Nested Class Summary |
| Nested classes inherited from class javax.swing.JDialog |
javax.swing.JDialog.AccessibleJDialog |
| Nested classes inherited from class java.awt.Dialog |
java.awt.Dialog.AccessibleAWTDialog |
| Nested classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
private static java.util.ResourceBundle |
g_Resources
|
private static javax.swing.Icon |
g_WizardImage
|
private boolean |
m_bFinished
|
private javax.swing.JButton |
m_CancelButton
|
private WizardPage |
m_CurrentPage
|
private javax.swing.JButton |
m_FinishButton
|
private javax.swing.JLabel |
m_ImageLabel
|
private CardPanel |
m_MainPanel
|
private javax.swing.JButton |
m_NextButton
|
private javax.swing.JButton |
m_PreviousButton
|
| Fields inherited from class javax.swing.JDialog |
accessibleContext, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Dialog |
|
| Fields inherited from class java.awt.Window |
|
| Fields inherited from class java.awt.Container |
|
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
Wizard(java.awt.Frame owner)
|
|
Wizard(java.awt.Frame owner,
boolean modal)
|
|
Wizard(java.awt.Frame owner,
java.lang.String title)
|
|
Wizard(java.awt.Frame owner,
java.lang.String title,
boolean modal)
Creates a new wizard dialog with no pages. |
|
Wizard(java.lang.String title)
|
|
| Method Summary | |
void |
addPage(WizardPage page)
Adds a new page to the end of this wizard. |
void |
addPage(WizardPage page,
int index)
Inserts a new page at the specified position in this wizard. |
void |
addPages(WizardPage[] pages,
int index)
|
void |
cancel()
|
protected javax.swing.JPanel |
createButtonPanel()
Creates the panel of buttons that appear at the bottom of the wizard. |
protected javax.swing.JButton |
createCancelButton()
|
protected javax.swing.JButton |
createFinishButton()
|
protected javax.swing.JButton |
createNextButton()
|
protected javax.swing.JButton |
createPreviousButton()
|
void |
finish()
Finishes this wizard. |
java.lang.String |
getCancelText(java.lang.String s)
Gets the text displayed in the cancel button. |
WizardPage |
getCurrentPage()
Gets the currently displayed page in this wizard. |
int |
getCurrentPageIndex()
Gets the index of the currently displayed page in this wizard. |
java.lang.String |
getFinishText()
Gets the text displayed in the finish button. |
javax.swing.Icon |
getImage()
Gets the image that is displayed to the left of the wizard. |
java.lang.String |
getNextText()
Gets the text displayed in the next button. |
WizardPage |
getPage(int index)
Gets the page specified by the supplied index for this wizard. |
int |
getPageCount()
Gets the number of pages in this wizard. |
java.lang.String |
getPreviousText()
Gets the text displayed in the previous button. |
static javax.swing.Icon |
getWizardImage()
|
boolean |
nextPage()
Advances to the next page. |
protected boolean |
onFinish()
|
void |
previousPage()
Goes back to the previous page. |
void |
setCancelText(java.lang.String s)
Sets the text displayed in the cancel button. |
private boolean |
setCurrentPage(int index,
boolean bValidate)
|
private boolean |
setCurrentPage(WizardPage page,
boolean bValidate)
Sets the currently displayed page for this wizard. |
void |
setFinishText(java.lang.String s)
Sets the text displayed in the finish button. |
void |
setImage(javax.swing.Icon image)
Sets the image that is displayed to the left of the wizard. |
void |
setNextText(java.lang.String s)
Sets the text displayed in the next button. |
void |
setPreviousText(java.lang.String s)
Sets the text displayed in the previous button. |
private void |
updateButtons()
Updates the status of the buttons. |
boolean |
wasFinished()
Checks if the dialog finished successfully or if the user canceled. |
| Methods inherited from class allensoft.gui.EscapeDialog |
createRootPane, escapePressed |
| Methods inherited from class java.awt.Dialog |
addNotify, dispose, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
m_MainPanel
private CardPanel m_MainPanel
m_ImageLabel
private javax.swing.JLabel m_ImageLabel
m_CurrentPage
private WizardPage m_CurrentPage
m_NextButton
private javax.swing.JButton m_NextButton
m_PreviousButton
private javax.swing.JButton m_PreviousButton
m_FinishButton
private javax.swing.JButton m_FinishButton
m_CancelButton
private javax.swing.JButton m_CancelButton
m_bFinished
private boolean m_bFinished
g_Resources
private static java.util.ResourceBundle g_Resources
g_WizardImage
private static javax.swing.Icon g_WizardImage
| Constructor Detail |
Wizard
public Wizard(java.awt.Frame owner, java.lang.String title, boolean modal)
- Creates a new wizard dialog with no pages.
Wizard
public Wizard(java.awt.Frame owner, java.lang.String title)
Wizard
public Wizard(java.awt.Frame owner, boolean modal)
Wizard
public Wizard(java.lang.String title)
Wizard
public Wizard(java.awt.Frame owner)
| Method Detail |
wasFinished
public boolean wasFinished()
- Checks if the dialog finished successfully or if the user canceled.
getFinishText
public java.lang.String getFinishText()
- Gets the text displayed in the finish button.
setFinishText
public void setFinishText(java.lang.String s)
- Sets the text displayed in the finish button.
getNextText
public java.lang.String getNextText()
- Gets the text displayed in the next button.
setNextText
public void setNextText(java.lang.String s)
- Sets the text displayed in the next button.
getPreviousText
public java.lang.String getPreviousText()
- Gets the text displayed in the previous button.
setPreviousText
public void setPreviousText(java.lang.String s)
- Sets the text displayed in the previous button.
getCancelText
public java.lang.String getCancelText(java.lang.String s)
- Gets the text displayed in the cancel button.
setCancelText
public void setCancelText(java.lang.String s)
- Sets the text displayed in the cancel button.
getImage
public javax.swing.Icon getImage()
- Gets the image that is displayed to the left of the wizard.
setImage
public void setImage(javax.swing.Icon image)
- Sets the image that is displayed to the left of the wizard.
getPageCount
public int getPageCount()
- Gets the number of pages in this wizard.
getPage
public WizardPage getPage(int index)
- Gets the page specified by the supplied index for this wizard.
addPage
public void addPage(WizardPage page)
- Adds a new page to the end of this wizard.
addPage
public void addPage(WizardPage page, int index)
- Inserts a new page at the specified position in this wizard.
addPages
public void addPages(WizardPage[] pages, int index)
getCurrentPage
public WizardPage getCurrentPage()
- Gets the currently displayed page in this wizard.
getCurrentPageIndex
public int getCurrentPageIndex()
- Gets the index of the currently displayed page in this wizard.
setCurrentPage
private boolean setCurrentPage(WizardPage page, boolean bValidate)
- Sets the currently displayed page for this wizard.
setCurrentPage
private boolean setCurrentPage(int index,
boolean bValidate)
nextPage
public boolean nextPage()
- Advances to the next page.
previousPage
public void previousPage()
- Goes back to the previous page.
cancel
public void cancel()
finish
public void finish()
- Finishes this wizard. The current page is checked for validity and then the wizard is
hidden.
onFinish
protected boolean onFinish()
getWizardImage
public static javax.swing.Icon getWizardImage()
createButtonPanel
protected javax.swing.JPanel createButtonPanel()
- Creates the panel of buttons that appear at the bottom of the wizard.
createNextButton
protected javax.swing.JButton createNextButton()
createPreviousButton
protected javax.swing.JButton createPreviousButton()
createFinishButton
protected javax.swing.JButton createFinishButton()
createCancelButton
protected javax.swing.JButton createCancelButton()
updateButtons
private void updateButtons()
- Updates the status of the buttons.
|
|||||||||
| Home >> All >> allensoft >> [ gui overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC