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

public interface IWizardStep

This class represents a step in a wizard. It's primary function is to provide the Swing components that should be displayed in the wizard dialog. In addition, it informs the `WizardDialog``` whether certain buttons are visible and enabled. Any state needed by the wizard should be maintained during the step. Typically the step will have a reference to the containing wizard and share information with it as the user types.

## Method Summary

`public `Component`` | `getComponent`() Gets the AWT component that should be placed in the Wizard Dialog.
`public `String`` | `getStepDescription`() Gets the description of this step of the wizard
`public `String`` | `getStepTitle`() Gets the title of this step of the wizard.
`public boolean` | `isFinishVisible`() Determines whether or not the finish button is visible in the Wizard button bar.
`public boolean` | `isHelpEnabled`() Determines whether or not the help button is enabled for this step.
`public boolean` | `isNextEnabled`() Determines whether or not the next button is currently enabled.
`public boolean` | `isNextVisible`() Determines whether or not the next button is visible in the Wizard button bar.
`public boolean` | `isPreviousVisible`() Determines whether or not the previous button is visible in the Wizard button bar.
`public void` | `onHelp`() Called when the user clicks on the help button.
`public boolean` | `onNext`() This method is called when the user clicks on the next button.

## Method Detail

### getComponent() Method

    public Component getComponent()

Gets the AWT component that should be placed in the Wizard Dialog. The step is responsible for monitoring the component and periodically calling `IWizardContext.resetButtonStates()``` in order to update the various buttons. This should be used to respond to the user modifying the contents of the dialog.

#### Returns

AWT component to add to the dialog.

### getStepDescription() Method

    public String getStepDescription()

Gets the description of this step of the wizard

#### Returns

String containing the description for this step

### getStepTitle() Method

    public String getStepTitle()

Gets the title of this step of the wizard.

#### Returns

String containing the title for this step

### isFinishVisible() Method

    public boolean isFinishVisible()

Determines whether or not the finish button is visible in the Wizard button bar. This should return whenever the information in this step is sufficient to finish the wizard. Note that this does not have to occur only on the last step. A wizard may allow finish any time that the remaining steps can be completed in some default manner.

### isHelpEnabled() Method

    public boolean isHelpEnabled()

Determines whether or not the help button is enabled for this step. If enabled, onHelp will be called when the user clicks on help.

#### Returns

boolean indicating whether the help button is enabled

### isNextEnabled() Method

    public boolean isNextEnabled()

Determines whether or not the next button is currently enabled. This should be true if the user has filled in enough information on this step to allow moving on to the next step. This is usually called in response to a call to `IWizardContext.resetButtonStates()```.

#### Returns

boolean indicating whether the next button is enabled

### isNextVisible() Method

    public boolean isNextVisible()

Determines whether or not the next button is visible in the Wizard button bar. This should return true for all but the last step.

#### Returns

boolean indicating whether the next button is visible

### isPreviousVisible() Method

    public boolean isPreviousVisible()

Determines whether or not the previous button is visible in the Wizard button bar. This should return true for all but the first step.

#### Returns

boolean indicating whether the previous button is visible

### onHelp() Method

    public void onHelp()

Called when the user clicks on the help button. Should display any help relevant to the current step.

### onNext() Method

    public boolean onNext()

This method is called when the user clicks on the next button. The step should perform any final validation and update the containing wizard with any relevant state information. The step may override moving on to the next step by returning false. In that case, some feedback should be provided to the user to indicate why they cannot yet move on. If true is returned, the wizard should expect a subsequent call to `IWizard.getNextStep()```.

#### Returns

true to indicate the wizard should proceed to the next step or false to cause the wizard to remain on the current step.