|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bws42.wizard.Wizard
Central class of the Wizard. It is responsible for displaying and changing the panels that are visible to the user by listening for clicks on the next and previous buttons. It defaults to a 400x400 frame unless specified otherwise.
Field Summary | |
static int |
DEFAULT_HEIGHT
Holds the default wizard height. |
static int |
DEFAULT_WIDTH
Holds the default wizard width. |
Constructor Summary | |
Wizard(Locale language)
Creates a new Wizard in the given language if available. |
Method Summary | |
void |
actionPerformed(ActionEvent evt)
Listens for clicks on the next/previous buttons and acts accordingly. |
void |
displayWizard()
Creates and displays the wizard. |
void |
displayWizard(WizardObject obj)
Creates and displays the wizard using the info stored in the WizardObject. |
JFrame |
getFrame()
Returns a pointer to the JFrame of the wizard. |
JButton |
getNextButton()
Returns a pointer to the next button. |
JButton |
getPrevButton()
Returns a pointer to the previous button. |
void |
setLanguage(Locale locale)
Changes the language of the Wizard to the language of the given locale if available. |
void |
setWizardFactory(WizardFactory factory)
Sets the WizardFactory for the Wizard. |
void |
setWizardSize(int width,
int height)
Sets the size of the wizard window. |
void |
setWizardTitle(String title)
Sets the title of the wizard window. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEFAULT_WIDTH
public static final int DEFAULT_HEIGHT
Constructor Detail |
public Wizard(Locale language)
language
- the locale for the desired language.Method Detail |
public final void setWizardTitle(String title)
title
- the title of the wizard windowpublic final void setWizardSize(int width, int height)
width
- the desired widthheight
- the desired heightpublic final void setWizardFactory(WizardFactory factory)
factory
- the WizardFactory for this wizardpublic final JButton getNextButton()
public final JButton getPrevButton()
public final JFrame getFrame()
public final void displayWizard()
public final void displayWizard(WizardObject obj) throws WizardException
obj
- the WizardObject with the information needed to create the
Wizard.
WizardException
- if the information is not satisfactory.public final void setLanguage(Locale locale)
locale
- the new localepublic final void actionPerformed(ActionEvent evt)
actionPerformed
in interface ActionListener
evt
- the action event
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |