Packages
 In this topic

*Methods

 

Packages   PreviousThis PackageNext
Package com.ms.ui   Previous This
Package
Next

 


Interface IUIWizardStep

public abstract interface IUIWizardStep
{
  // Methods
  public IUIComponent getContent();
  public IUIComponent getImage();
  public UIWizard getWizard();
  public boolean isFinishStep() ;
  public boolean isLastStep();
  public IUIWizardStep nextStep();
  public IUIWizardStep previousStep();
  public void setWizard(UIWizard wizard);
}

This interface is used to display properties of wizard pages. UIWizardStep implements IUIWizardStep.

The following example demonstrates a simple implementation of IUIWizardStep.


//Return null to getNextStep(); (The wizard will select the next page.)
//Return null to getPreviousStep(); (The wizard will pick the previous page
                                     from the undo stack.)
//getWizard(); (Automatically set by the wizard when the page is added.)
//isFinishStep(); (Returns true if this page was constructed as the last step;
                   causes the Finish button to light.)
//isLastStep(); (Returns true if this page was constructed as the last step;
                 causes the Next button to dim.)
//nextStep(); (Calls getNextStep();)
//previousStep; (Returns null.)

Methods

getContent

public IUIComponent getContent();

Retrieves the IUIComponent that the current wizard page uses for content.

Return Value:

Returns the component used for content.

getImage

public IUIComponent getImage();

Retrieves the IUIComponent that is used as an image in the current wizard page.

Return Value:

Returns the component used as an image.

getWizard

public UIWizard getWizard();

Retrieves the wizard associated with the page.

Return Value:

Returns the associated UIWizard object.

isFinishStep

public boolean isFinishStep() ;

Determines whether the currently viewed wizard page allows a valid selection of the Finish button.

Return Value:

Returns true if the current page is a Finish step; otherwise, returns false.

Remarks:

A Finish step is not necessarily the last step, as an end user may be able to press the Finish button on some previous page and allow the wizard to set default values for the remaining pages in the series. The last step is the last logical page managed by the wizard, where the Next button is not a valid choice.

isLastStep

public boolean isLastStep();

Determines whether the currently viewed wizard page is the last page in the series. If true, the Next button is replaced with the Finish button.

Return Value:

Returns true if no more pages follow the current page; the Next button is shaded. Return true to isFinishStep; otherwise, returns false.

nextStep

public IUIWizardStep nextStep();

Retrieves the next wizard page object in the series managed by the associated UIWizard object.

Note When overridding this method, return null, and the next page in the vector of pages is transitioned to, and the previous page is put on the undo stack. Return the current page by using (getVisibleStep(), or "this" from getVisibleStep().nextStep()) to remain on this page. This is used when content on the page is validated, and found to be lacking certain information. Typically a message box is displayed to the user indicating the missing/incorrect information, and the user is returned to the current page. This page is not added to the undo stack.

Return Value:

Returns the next page in the series, or null if no more pages exist in the list.

See Also: com.ms.ui.UIWizard.getVisibleStep, previousStep

previousStep

public IUIWizardStep previousStep();

Retrieves the wizard page previous to the current one in the series managed by the associated UIWizard object.

Return Value:

Returns the previous page in the series; returns null if no previous pages exist in the list. Also, when overriding this method,return null to use the undo stack.

setWizard

public void setWizard(UIWizard wizard);

Sets the wizard that isassociated with the page.

Return Value:

No return value.

ParameterDescription
wizard The wizard that is associated with the page.

upnrm.gif © 1998 Microsoft Corporation. All rights reserved. Terms of use.