org.jfree.ui

Class WizardPanel


public abstract class WizardPanel
extends JPanel

A panel that provides the user interface for a single step in a WizardDialog.
Author:
David Gilbert

Constructor Summary

WizardPanel(LayoutManager layout)
Creates a new panel.

Method Summary

abstract boolean
canFinish()
Returns true if it is possible to finish from this panel.
abstract boolean
canRedisplayNextPanel()
Returns true if it is OK to redisplay the last version of the next panel, or false if a new version is required.
abstract WizardPanel
getNextPanel()
Returns the next panel in the sequence, given the current user input.
WizardDialog
getOwner()
Returns a reference to the dialog that owns the panel.
Object
getResult()
Returns the result.
abstract boolean
hasNextPanel()
Returns true if there is a next panel.
abstract void
returnFromLaterStep()
This method is called when the dialog redisplays this panel as a result of the user clicking the "Previous" button.
void
setOwner(WizardDialog owner)
Sets the reference to the dialog that owns the panel (this is called automatically by the dialog when the panel is added to the dialog).

Constructor Details

WizardPanel

protected WizardPanel(LayoutManager layout)
Creates a new panel.
Parameters:
layout - the layout manager.

Method Details

canFinish

public abstract boolean canFinish()
Returns true if it is possible to finish from this panel.
Returns:
boolean.

canRedisplayNextPanel

public abstract boolean canRedisplayNextPanel()
Returns true if it is OK to redisplay the last version of the next panel, or false if a new version is required.
Returns:
boolean.

getNextPanel

public abstract WizardPanel getNextPanel()
Returns the next panel in the sequence, given the current user input. Returns null if this panel is the last one in the sequence.
Returns:
the next panel in the sequence.

getOwner

public WizardDialog getOwner()
Returns a reference to the dialog that owns the panel.
Returns:
the owner.

getResult

public Object getResult()
Returns the result.
Returns:
the result.

hasNextPanel

public abstract boolean hasNextPanel()
Returns true if there is a next panel.
Returns:
boolean.

returnFromLaterStep

public abstract void returnFromLaterStep()
This method is called when the dialog redisplays this panel as a result of the user clicking the "Previous" button. Inside this method, subclasses should make a note of their current state, so that they can decide what to do when the user hits "Next".

setOwner

public void setOwner(WizardDialog owner)
Sets the reference to the dialog that owns the panel (this is called automatically by the dialog when the panel is added to the dialog).
Parameters:
owner - the owner.