com.bws42.wizard
Interface WizardPanel

All Superinterfaces:
Multilingual
All Known Implementing Classes:
AbstractWizardPanel

public interface WizardPanel
extends Multilingual

Implement this class to create a panel for a Wizard.

Version:
1.0, October 4, 2006
Author:
William P. Roberts, IV

Method Summary
 JComponent getComponent()
          Returns the component to display for this panel.
 WizardObject getWizardObject()
          Gets the wizard data object from the panel.
 boolean isNextAvailable()
          Returns whether or not the user should be able to click next.
 boolean isPrevAvailable()
          Returns whether or not the user should be able to click previous.
 void panelInstalled()
          Called after a panel has been displayed to the user.
 void setLanguageLoader(LanguageLoader lang)
          Sets the new language loader.
 void setWizardObject(WizardObject data)
          Sets the wizard data object for the panel.
 boolean validateContents()
          Tells the panel to validate its input options.
 

Method Detail

getWizardObject

public WizardObject getWizardObject()
Gets the wizard data object from the panel.

Returns:
the wizard data object for the program

setWizardObject

public void setWizardObject(WizardObject data)
                     throws WizardException
Sets the wizard data object for the panel.

Parameters:
data - the WizardObject
Throws:
WizardException - if the previous panel should remain visible instead of progressing to this one.

panelInstalled

public void panelInstalled()
Called after a panel has been displayed to the user. Allows you to do any final graphical configuration. This method should not be used to do any significant work as it will appear that your wizard has frozen.


isNextAvailable

public boolean isNextAvailable()
Returns whether or not the user should be able to click next. This is called only once after setWizardObject() is called.

Returns:
true if the user can click next

isPrevAvailable

public boolean isPrevAvailable()
Returns whether or not the user should be able to click previous. This is called only once after setWizardObject() is called.

Returns:
true if the user can click previous.

validateContents

public boolean validateContents()
Tells the panel to validate its input options. It should display an error message and return false if an option requires user input.

Returns:
true if the wizard is ready to proceed.

setLanguageLoader

public void setLanguageLoader(LanguageLoader lang)
Sets the new language loader.

Specified by:
setLanguageLoader in interface Multilingual
Parameters:
lang - the new LanguageLoader.

getComponent

public JComponent getComponent()
Returns the component to display for this panel.

Returns:
the component to display for this panel