org.qdwizard

Class Screen


public abstract class Screen
extends JPanel

A wizard screen
Author:
Bertrand Florat

Field Summary

HashMap
data
Wizard data

Constructor Summary

Screen()
Construct a screen

Method Summary

abstract String
getDescription()
Screen description (optional)
abstract String
getName()
Give here the step name.
String
getProblem()
Get current problem
Wizard
getWizard()
access to wizard instance
abstract void
initUI()
UI creation
void
onEnter()
Called by wizard before the screen is displayed.
void
onLeave()
Called by wizard before the screen is left.
void
setCanFinish(boolean b)
Set whether this screen is the last one
void
setProblem(String sProblem)
Set a problem (set to null if problem is fixed)
void
setWizard(Wizard wizard)
called in wizard after cosntructing a new Screen instance

Field Details

data

public HashMap data
Wizard data

Constructor Details

Screen

public Screen()
Construct a screen
Parameters:

Method Details

getDescription

public abstract String getDescription()
Screen description (optional)
Returns:
screen description

getName

public abstract String getName()
Give here the step name.
Returns:
screen name

getProblem

public String getProblem()
Get current problem
Returns:
the current problem

getWizard

public Wizard getWizard()
access to wizard instance
Returns:

initUI

public abstract void initUI()
UI creation

onEnter

public void onEnter()
Called by wizard before the screen is displayed. This happens only in forwardmode, which means onEnter won't be called when you return to a screen via the previous button.

onLeave

public void onLeave()
Called by wizard before the screen is left. This happens only in forwardmode, which means onLeave won't be called when you leave the screen via the previous button.

You *may* throw a runtime exception in this method with the effect that the next screen will not be shown. Be aware however that the exception will only be shown in the console unless you define your own exception handler via the sun.awt.exception.handler system property.


setCanFinish

public void setCanFinish(boolean b)
Set whether this screen is the last one
Parameters:
b -

setProblem

public void setProblem(String sProblem)
Set a problem (set to null if problem is fixed)
Parameters:
sProblem - Problem string or null if no more problem

setWizard

public void setWizard(Wizard wizard)
called in wizard after cosntructing a new Screen instance
Parameters:
wizard -