org.pietschy.wizard.models
Class Path

java.lang.Object
  extended byorg.pietschy.wizard.models.Path
Direct Known Subclasses:
BranchingPath, SimplePath

public abstract class Path
extends java.lang.Object

Paths represent a sequence of WizardSteps.


Constructor Summary
protected Path()
           
 
Method Summary
abstract  void acceptVisitor(PathVisitor visitor)
           
 void addStep(WizardStep step)
          Adds a wizard step to this path.
 boolean contains(WizardStep step)
           
 WizardStep firstStep()
           
protected abstract  Path getNextPath(MultiPathModel model)
          Gets the path that will follow this one.
 java.util.ArrayList getSteps()
           
 boolean isFirstStep(WizardStep step)
          Checks if the specified step is the first step in the path.
 boolean isLastStep(WizardStep step)
          Checks if the specified step is the last step in the path.
 WizardStep lastStep()
           
 WizardStep nextStep(WizardStep currentStep)
           
 WizardStep previousStep(WizardStep currentStep)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Path

protected Path()
Method Detail

getNextPath

protected abstract Path getNextPath(MultiPathModel model)
Gets the path that will follow this one.

Returns:
the next path.

addStep

public void addStep(WizardStep step)
Adds a wizard step to this path. Paths must contain at least one step, and the steps will be traversed in the order they are added.

Parameters:
step - the next WizardStep in the path.

firstStep

public WizardStep firstStep()

nextStep

public WizardStep nextStep(WizardStep currentStep)

previousStep

public WizardStep previousStep(WizardStep currentStep)

lastStep

public WizardStep lastStep()

isFirstStep

public boolean isFirstStep(WizardStep step)
Checks if the specified step is the first step in the path.

Parameters:
step - the step to check
Returns:
true if the step is the first in the path, false otherwise.

isLastStep

public boolean isLastStep(WizardStep step)
Checks if the specified step is the last step in the path.

Parameters:
step - the step to check
Returns:
true if the step is the last in the path, false otherwise.

getSteps

public java.util.ArrayList getSteps()

contains

public boolean contains(WizardStep step)

acceptVisitor

public abstract void acceptVisitor(PathVisitor visitor)


Copyright © 2004 Andrew Pietsch.