org.processmining.framework.util.ui.wizard.old
Class ProMWizard

java.lang.Object
  extended by org.processmining.framework.util.ui.wizard.old.ProMWizard

public abstract class ProMWizard
extends java.lang.Object

This abstract class provides the basic stuff needed for a wizard. To use this class, one needs to implement the following functions:

The Steps in the wizard should inherit from the ProMWizardStep. Each Step needs to implement a precondition. If the precondition is returned false, the wizard tries to advance to the "next" step (where next is the next in the direction one is moving), i.e., if the precondition of a step returns false, the step is skipped.

Author:
jvdwerf

Constructor Summary
ProMWizard(org.processmining.contexts.uitopia.UIPluginContext context, java.lang.String title)
          Constructor.
 
Method Summary
abstract  boolean cancel()
          Executed if the user hits the cancel button during execution
abstract  boolean finish()
          Executed if the user hits the finish button during execution
 org.processmining.contexts.uitopia.UIPluginContext getContext()
           
 int getCurrentStep()
           
 ProMWizardStep getStep(int nr)
          Returns the step with nr.
 java.lang.String getTitle()
           
protected  int go(int direction)
          Traverses "direction" steps.
abstract  ProMWizardStep[] init()
          Initialization of the wizard.
abstract  boolean next()
          Executed if the user hits the next button during execution
abstract  boolean previous()
          Ececuted if the user hits the previous button during execution
abstract  void readSettings()
          Reads settings.
 org.deckfour.uitopia.api.event.TaskListener.InteractionResult showWizard()
          This is the main function of the Wizard.
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProMWizard

public ProMWizard(org.processmining.contexts.uitopia.UIPluginContext context,
                  java.lang.String title)
Constructor. Both the context and the title need to be set.

Parameters:
context -
title -
Method Detail

size

public int size()
Returns:
The number of steps available in the wizard

getTitle

public java.lang.String getTitle()
Returns:
the title of the wizard

getContext

public org.processmining.contexts.uitopia.UIPluginContext getContext()
Returns:
the context in which the wizard is running

getStep

public ProMWizardStep getStep(int nr)
Returns the step with nr.

Parameters:
nr -
Returns:
the step with nr

getCurrentStep

public int getCurrentStep()

init

public abstract ProMWizardStep[] init()
Initialization of the wizard. This function will be called first in the showWizard function. This function returns the steps that will be performed during the Wizard.

Returns:
the steps the wizard needs to take

readSettings

public abstract void readSettings()
Reads settings.


cancel

public abstract boolean cancel()
Executed if the user hits the cancel button during execution


finish

public abstract boolean finish()
Executed if the user hits the finish button during execution


next

public abstract boolean next()
Executed if the user hits the next button during execution


previous

public abstract boolean previous()
Ececuted if the user hits the previous button during execution


showWizard

public org.deckfour.uitopia.api.event.TaskListener.InteractionResult showWizard()
This is the main function of the Wizard. It displays the wizard, and provides all the necessary code to walk through the steps of the wizard. First the wizard is initialized, by execution the init() function. If the user hits cancel, the cancel() function is called, likewise, finish() is called if the user hits the finish button.

Returns:
the result of the wizard (i.e., whether it is finished, or canceled)

go

protected int go(int direction)
Traverses "direction" steps. If the precondition of the next step does not hold, "direction" steps are taken again, until the precondition of a step holds.

Parameters:
direction -
Returns:
the next wizard step according to the direction.