# com.bea.ide.ui.wizard
IWizard Interface

public interface IWizard

This class is the interface used by the WizardDialog to generate a wizard ui. A wizard is a step-by-step process to achieve some result. The IWizard interface is the encompassing class that is used to iterate through each step and perform the final processing. The object exposing IWizard should be stateful. It will be called to navigate from one step to the next and so should Instances of IWizard may be used in constructing the `WizardDialog``` object.

All Known Implementing Classes
  `DefaultWizard`

## Method Summary

`public `String`` | `getFinishText`() Returns the string to use for the finish button.
`public `IWizardStep`` | `getNextStep`() Get the next wizard step for display.
`public `IWizardStep`` | `getPreviousStep`() Get the previous wizard step for display.
`public `String`` | `getWizardDescription`() Obtain the string that should be displayed at the top of the Wizard dialog explaining what this wizard does.
`public `String`` | `getWizardTitle`() Obtain the string that should be displayed as the title of the Wizard dialog.
`public void` | `initialize`(`IWizardContext` wc) Initialize this wizard with the IWizardContext for the dialog
`public boolean` | `isFinishEnabled`() This method is used by the WizardDialog to determin if the finish button should be enabled.
`public boolean` | `onCancel`() Called when the user clicks on the cancel button.
`public void` | `onDispose`() Called when the WizardDialog is about to remove itself from the screen.
`public boolean` | `onFinish`() Called when the user clicks on the finish button.

## Method Detail

### getFinishText() Method

    public String getFinishText()

Returns the string to use for the finish button. This allows the finish button to be a more descriptive verb indicating what the wizard does

#### Returns

String indicating text for the Finish button

### getNextStep() Method

    public IWizardStep getNextStep()

Get the next wizard step for display. This step should be a continuation of the wizard. If the current step is the final step of the wizard, this method should return null.

#### Returns

`IWizardStep``` interface for the next step or null if the current step is the final one.

### getPreviousStep() Method

    public IWizardStep getPreviousStep()

Get the previous wizard step for display. This step should preserve all it's state and render itself as if the user had just left it. If the current step is the first step, this method should return null.

#### Returns

`IWizardStep``` interface for the previous step or null if the current step is the first one.

### getWizardDescription() Method

    public String getWizardDescription()

Obtain the string that should be displayed at the top of the Wizard dialog explaining what this wizard does.

#### Returns

string containing the text of the dialog dexcription

### getWizardTitle() Method

    public String getWizardTitle()

Obtain the string that should be displayed as the title of the Wizard dialog.

#### Returns

string containing the text for the dialog title

### initialize(IWizardContext) Method

    public void initialize(IWizardContext wc)

Initialize this wizard with the IWizardContext for the dialog

#### Parameters

wc
  The wizard context provided by the dialog. This should be used to refresh the status of buttons in the dialog when appropriate.

### isFinishEnabled() Method

    public boolean isFinishEnabled()

This method is used by the WizardDialog to determin if the finish button should be enabled. It will be called when the step is first shown, as well as anytime `IWizardContext.resetButtonStates()``` is called. The Wizard should enable the finish button, when the user has entered enough information to be able to finish the wizard. Note that the finish button is not visible unless the method `IWizardStep.isFinishVisible()``` returns true

#### Returns

boolean indicating whether or not the finish button should be enabled.

### onCancel() Method

    public boolean onCancel()

Called when the user clicks on the cancel button. This provides an opportunity for the wizard to perform any cleanup that is specific to cancelling. This method can return false in order to cancel the close. This allows the wizard to perform an "Are you sure?" type check if appropriate.

#### Returns

true to indicate the wizard should be removed, false if the cancel was aborted and the dialog should remain active.

### onDispose() Method

    public void onDispose()

Called when the WizardDialog is about to remove itself from the screen. This method should be used to perform any cleanup that is necessary for both cancel and finish.

### onFinish() Method

    public boolean onFinish()

Called when the user clicks on the finish button. This is an opportunity for the wizard to perform any necessary validation and final work to finish the wizard. The method should return false to indicate that there was some kind of failure and the WizardDialog should not go away. Any success or failure messages should be displayed by the IWizard during this call.

#### Returns

true to indicate that the wizard was successful and the dialog should be removed or false if the dialog should remain active.