sk.uniba.euromath.editor.wizards.document
Class ExportWizardProvider

java.lang.Object
  extended by sk.uniba.euromath.editor.wizards.document.ExportWizardProvider
All Implemented Interfaces:
IMultiWizardProvider

public final class ExportWizardProvider
extends Object
implements IMultiWizardProvider

The exportation wizard. Provides following pages:

  1. Output document class (or coordinator) selection wizard,
  2. Coordinator's configuration widget (this step is skipped when coordinator does not need to be configured),
  3. Graph selector widget (this step is skipped if there are no multiple paths in given graph),
  4. Output file name selection

The wizard does not execute the export itself; it merely serves for data collection purpose.

Author:
Martin Vysny

Field Summary
protected  XMLAccess xmlAccess
          Document instance.
 
Constructor Summary
ExportWizardProvider(XMLAccess xmlAccess)
          Constructor.
 
Method Summary
 IWizard current()
          Fetches the current wizard.
 void dispose()
          Provider should dispose any objects it collected.
 ICoordinator getCoordinator()
          Returns current coordinator.
 String getFileName()
          Output file name.
 String getName()
          Returns name of this wizard.
 TransformGraph getTransformGraph()
          The export graph descriptor.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xmlAccess

protected final XMLAccess xmlAccess
Document instance.

Constructor Detail

ExportWizardProvider

public ExportWizardProvider(XMLAccess xmlAccess)
Constructor.

Parameters:
xmlAccess - the document instance
Method Detail

performFinish

public void performFinish()
Description copied from interface: IMultiWizardProvider
Called when all wizards (from first wizard to current wizard) have already been finished.

Specified by:
performFinish in interface IMultiWizardProvider

performCancel

public void performCancel()
Description copied from interface: IMultiWizardProvider
Called when all opened wizards (from first wizard to current wizard) have already been cancelled.

Specified by:
performCancel in interface IMultiWizardProvider

getCoordinator

public ICoordinator getCoordinator()
Returns current coordinator. Valid when wizard is not showing first page.

Returns:
current coordinator. If the wizard is cancelled then coordinator is disposed and must not be used. If the wizard is finished then coordinator is already configured and getGraphBuilder() (getTransformationChain() respectively) has been called.

getTransformGraph

public TransformGraph getTransformGraph()
The export graph descriptor. Valid when wizard is showing the last page.

Returns:
The export graph descriptor. Valid when wizard is showing the last page.

getFileName

public String getFileName()
Output file name. Valid after the wizard is finished.

Returns:
Output file name. Valid after the wizard is finished.

dispose

public void dispose()
Description copied from interface: IMultiWizardProvider
Provider should dispose any objects it collected. Wizards are disposed automatically by the MultiWizard.

Specified by:
dispose in interface IMultiWizardProvider

setWizard

public void setWizard(MultiWizard wizard)
Description copied from interface: IMultiWizardProvider
Sets the multi-wizard object instance, that'll navigate user through other wizards using this provider.

Specified by:
setWizard in interface IMultiWizardProvider
Parameters:
wizard - the wizard that'll use this provider.

current

public IWizard current()
Description copied from interface: IMultiWizardProvider
Fetches the current wizard.

Specified by:
current in interface IMultiWizardProvider
Returns:
current wizard. May return null only if the provider provides no wizards.

next

public IWizard next()
             throws ProviderException
Description copied from interface: IMultiWizardProvider
Fetches the next wizard. Function may fail even when hasNext() returned true - it may throw ProviderException.

Specified by:
next in interface IMultiWizardProvider
Returns:
next wizard. The wizard does not have to be initialized - MultiWizard initializes it for you. Never null.
Throws:
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

public IWizard previous()
Description copied from interface: IMultiWizardProvider
Fetches the previous wizard. Current wizard is automatically disposed.

Specified by:
previous in interface IMultiWizardProvider
Returns:
previous wizard.

hasNext

public boolean hasNext()
Description copied from interface: IMultiWizardProvider
Checks if there is next wizard.

Specified by:
hasNext in interface IMultiWizardProvider
Returns:
true if there is next wizard or false if next() will fail.

hasPrevious

public boolean hasPrevious()
Description copied from interface: IMultiWizardProvider
Checks if there is previous wizard.

Specified by:
hasPrevious in interface IMultiWizardProvider
Returns:
true if there is previous wizard or false if previous() will fail.

getName

public String getName()
Description copied from interface: IMultiWizardProvider
Returns name of this wizard. Describes this wizard. Shown in the dialog.

Specified by:
getName in interface IMultiWizardProvider
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.