org.pietschy.wizard
Interface WizardStep

All Known Implementing Classes:
AbstractWizardStep, PanelWizardStep

public interface WizardStep

All changes to properties must fire property change events.

Version:
$Revision: 1.14 $
Author:
andrewp

Field Summary
static java.lang.String _ID_
           
 
Method Summary
 void abortBusy()
          Called by the wizard if the user presses cancel while the step is in a busy state.
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
           
 void applyState()
          This method is called whenever the user presses next while this step is active.
 javax.swing.Icon getIcon()
          Gets the Icon that represents this step.
 java.lang.String getName()
          Gets the name of this step.
 java.awt.Dimension getPreferredSize()
          This method must return the maximum preferred size of this wizard step.
 java.lang.String getSummary()
          Gets the summary of this step.
 java.awt.Component getView()
          Returns the current view this step is displaying.
 void init(WizardModel model)
          Called to initialize the step.
 boolean isBusy()
          Checks if the current task is busy.
 boolean isComplete()
          Checks if this step is compete.
 void prepare()
          Called to prepare this step to display.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
           
 

Field Detail

_ID_

public static final java.lang.String _ID_
See Also:
Constant Field Values
Method Detail

getName

public java.lang.String getName()
Gets the name of this step. This will be displayed in the title of the wizard while this step is active.

Returns:
the name of this step.

getSummary

public java.lang.String getSummary()
Gets the summary of this step. This will be displayed in the title of the wizard while this step is active. The summary is typically an overview of the step or some usage guidelines for the user.

Returns:
the summary of this step.

getIcon

public javax.swing.Icon getIcon()
Gets the Icon that represents this step.

Returns:
the Icon that represents this step, or null if the step doesn't have an icon.

getView

public java.awt.Component getView()
Returns the current view this step is displaying. This component will be displayed in the main section of the wizard with this step is active. This may changed at any time by as long as an appropriate property change event is fired.

Returns:
the current view of the step.

isComplete

public boolean isComplete()
Checks if this step is compete. This method should return true if the wizard can proceed to the next step.

Returns:
true if the wizard can proceed from this step, false otherwise.

isBusy

public boolean isBusy()
Checks if the current task is busy. This usually indicates that the step is performing a time consuming task on a background thread.

Returns:
true if step is busy performing a background operation, false otherwise.
See Also:
abortBusy()

init

public void init(WizardModel model)
Called to initialize the step. This method will be called when the wizard is first initialising.

Parameters:
model - the model to which the step belongs.

prepare

public void prepare()
Called to prepare this step to display. Subclasses should query the model and configure their view appropriately.

This method will be called whenever the step is to be displayed, regardless of whether the user pressed next or previous.


applyState

public void applyState()
                throws InvalidStateException
This method is called whenever the user presses next while this step is active.

If this method will take a long time to complete, subclasses should consider executing the work and a separate thread and displaying some kind of progress indicator.

This method will only be called if WizardModel.isNextAvailable() and isComplete() return true.

Throws:
InvalidStateException - if an error occurs and the wizard can't progress to the next step. By default the message of this exception will be displayed to the user. If you wish to prevent this behaviour please ensure InvalidStateException.setShowUser(boolean) is called with a value of false.

abortBusy

public void abortBusy()
Called by the wizard if the user presses cancel while the step is in a busy state. This method will be called after the user has confirmed the abort process and as such may be invoked after the step is no longer busy.


getPreferredSize

public java.awt.Dimension getPreferredSize()
This method must return the maximum preferred size of this wizard step. This method will be called during wizard initialization to determine the correct size of the wizard. This method will be called after init(org.pietschy.wizard.WizardModel).

Returns:
the preferred size of this step.

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String propertyName,
                                      java.beans.PropertyChangeListener listener)

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String propertyName,
                                         java.beans.PropertyChangeListener listener)


Copyright © 2004 Andrew Pietsch.