org.qdwizard

Class Wizard

Implemented Interfaces:
ActionListener

public abstract class Wizard
extends java.lang.Object
implements ActionListener

A Wizard dialog displaying one to many screens
Author:
Bertrand Florat

Field Summary

static HashMap
data
Wizard data

Constructor Summary

Wizard(String sName, Class initial, ImageIcon icon, Frame parentWindow)
Wizard constructor (uses default locale)
Wizard(String sName, Class initial, ImageIcon icon, Frame parentWindow, Locale locale)
Wizard constructor

Method Summary

void
actionPerformed(ActionEvent ae)
void
cancel()
Empty cancel action.
void
clearScreens()
Clear screens history
abstract void
finish()
Finish action.
Class
getCurrentScreen()
Get curent screen
JDialog
getDialog()
access to the jdailog of the wizard, in case we need it (for instance to set a glasspane when waiting)
abstract Class
getNextScreen(Class screen)
abstract Class
getPreviousScreen(Class screen)
void
show()

Field Details

data

public static HashMap data
Wizard data

Constructor Details

Wizard

public Wizard(String sName,
              Class initial,
              ImageIcon icon,
              Frame parentWindow)
Wizard constructor (uses default locale)
Parameters:
sName - Wizard name displayed in dialog title
initial - Initial screen class
icon - Wizard icon (null if no icon)
parentWindow - wizard parent window

Wizard

public Wizard(String sName,
              Class initial,
              ImageIcon icon,
              Frame parentWindow,
              Locale locale)
Wizard constructor
Parameters:
sName - Wizard name displayed in dialog title
initial - Initial screen class
icon - Wizard icon (null if no icon)
parentWindow - wizard parent window
locale - Wizard locale

Method Details

actionPerformed

public void actionPerformed(ActionEvent ae)

cancel

public void cancel()
Empty cancel action. Called when user clicks on "cancel". Override it if you want to do something in cancel.

clearScreens

public void clearScreens()
Clear screens history

finish

public abstract void finish()
Finish action. Called when user clicks on "finish"

getCurrentScreen

public Class getCurrentScreen()
Get curent screen
Returns:
current screen class

getDialog

public JDialog getDialog()
access to the jdailog of the wizard, in case we need it (for instance to set a glasspane when waiting)
Returns:
the wizard dialog

getNextScreen

public abstract Class getNextScreen(Class screen)
Returns:
next screen class

getPreviousScreen

public abstract Class getPreviousScreen(Class screen)
Returns:
previous screen class

show

public void show()