sk.uniba.euromath.editor.wizards
Interface IMultiWizardProvider

All Known Implementing Classes:
ExportWizardProvider, FillNewElementWizardProvider, InsertElementWizardProvider, NewDocumentWizardProvider

public interface IMultiWizardProvider

Provides wizards for the MultiWizard class.

The hasNext() will be queried only in case that the active wizard can finish - this is because next wizard may depend on the contents of active wizard.

Initially the object is be positioned over first wizard (current() returns first wizard). If the provider does not contain any wizards then it may return null.

Author:
Martin Vysny

Method Summary
 IWizard current()
          Fetches the current wizard.
 void dispose()
          Provider should dispose any objects it collected.
 String getName()
          Returns name of this wizard.
 boolean hasNext()
          Checks if there is next wizard.
 boolean hasPrevious()
          Checks if there is previous wizard.
 IWizard next()
          Fetches the next wizard.
 void performCancel()
          Called when all opened wizards (from first wizard to current wizard) have already been cancelled.
 void performFinish()
          Called when all wizards (from first wizard to current wizard) have already been finished.
 IWizard previous()
          Fetches the previous wizard.
 void setWizard(MultiWizard wizard)
          Sets the multi-wizard object instance, that'll navigate user through other wizards using this provider.
 

Method Detail

performFinish

void performFinish()
Called when all wizards (from first wizard to current wizard) have already been finished.


performCancel

void performCancel()
Called when all opened wizards (from first wizard to current wizard) have already been cancelled.


dispose

void dispose()
Provider should dispose any objects it collected. Wizards are disposed automatically by the MultiWizard.


setWizard

void setWizard(MultiWizard wizard)
Sets the multi-wizard object instance, that'll navigate user through other wizards using this provider.

Parameters:
wizard - the wizard that'll use this provider.

current

IWizard current()
Fetches the current wizard.

Returns:
current wizard. May return null only if the provider provides no wizards.

next

IWizard next()
             throws ProviderException
Fetches the next wizard. Function may fail even when hasNext() returned true - it may throw ProviderException.

Returns:
next wizard. The wizard does not have to be initialized - MultiWizard initializes it for you. Never null.
Throws:
NoSuchElementException - if there is no next wizard.
ProviderException - if next wizard instance cannot be constructed thanks to some unexpected error. In such case, wizard stays at current page, exception is logged and an error dialog is shown.

previous

IWizard previous()
Fetches the previous wizard. Current wizard is automatically disposed.

Returns:
previous wizard.
Throws:
NoSuchElementException - if current wizard is the first wizard.

hasNext

boolean hasNext()
Checks if there is next wizard.

Returns:
true if there is next wizard or false if next() will fail.

hasPrevious

boolean hasPrevious()
Checks if there is previous wizard.

Returns:
true if there is previous wizard or false if previous() will fail.

getName

String getName()
Returns name of this wizard. Describes this wizard. Shown in the dialog.

Returns:
displayable wizard name, like 'New element contents'. If null then the name is collected from child wizards.


Copyright © 2003-2006 null. All Rights Reserved.