lisken.uitoolbox
Class Wizard

java.lang.Object
  extended by lisken.uitoolbox.Wizard
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class Wizard
extends java.lang.Object
implements java.awt.event.ActionListener

A Wizard object can be used to represent the classical GUI pattern of a sequence of dialogs which guide the user to a set of parameters that need to be provided. The individual stages of a Wizard are represented by WizardStage objects.


Field Summary
static java.lang.String CANCEL
           
static java.lang.String EXIT
           
static java.lang.String FINISH
           
static java.lang.String NEXT
           
static java.lang.String PREVIOUS
           
static java.lang.String SHOWING
           
 
Constructor Summary
Wizard(java.lang.String title)
          Creates a new Wizard.
Wizard(java.lang.String title, java.awt.Image img)
          Creates a new Wizard.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 WizardStage getStage()
          Returns the current stage of this Wizard.
 int getStageNo()
           
 java.awt.Window getWindow()
           
 void nextStage(javax.swing.JComponent wizardContent, java.awt.event.ActionListener wizardListener, java.lang.String previousText, java.lang.String nextText, java.lang.String finishText, java.lang.String cancelText, java.lang.String exitText)
           
 void nextStage(javax.swing.JComponent wizardContent, java.awt.event.ActionListener wizardListener, java.lang.String previousText, java.lang.String nextText, java.lang.String finishText, java.lang.String cancelText, java.lang.String exitText, boolean setDefaultButton)
           
 void previousStage()
           
 void toStage(int n)
           
 void toStage(int n, boolean forgetLaterStages)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREVIOUS

public static final java.lang.String PREVIOUS
See Also:
Constant Field Values

NEXT

public static final java.lang.String NEXT
See Also:
Constant Field Values

FINISH

public static final java.lang.String FINISH
See Also:
Constant Field Values

CANCEL

public static final java.lang.String CANCEL
See Also:
Constant Field Values

EXIT

public static final java.lang.String EXIT
See Also:
Constant Field Values

SHOWING

public static final java.lang.String SHOWING
See Also:
Constant Field Values
Constructor Detail

Wizard

public Wizard(java.lang.String title)
Creates a new Wizard.

Parameters:
title - The title for this Wizard.

Wizard

public Wizard(java.lang.String title,
              java.awt.Image img)
Creates a new Wizard.

Parameters:
title - The title for this Wizard.
img - The icon that is used for the windows in this wizard
Method Detail

nextStage

public void nextStage(javax.swing.JComponent wizardContent,
                      java.awt.event.ActionListener wizardListener,
                      java.lang.String previousText,
                      java.lang.String nextText,
                      java.lang.String finishText,
                      java.lang.String cancelText,
                      java.lang.String exitText)

nextStage

public void nextStage(javax.swing.JComponent wizardContent,
                      java.awt.event.ActionListener wizardListener,
                      java.lang.String previousText,
                      java.lang.String nextText,
                      java.lang.String finishText,
                      java.lang.String cancelText,
                      java.lang.String exitText,
                      boolean setDefaultButton)

previousStage

public void previousStage()

toStage

public void toStage(int n)

toStage

public void toStage(int n,
                    boolean forgetLaterStages)

getStage

public WizardStage getStage()
Returns the current stage of this Wizard.

Returns:
the current stage of this Wizard.

getStageNo

public int getStageNo()

getWindow

public java.awt.Window getWindow()

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener