de.esprit.common.gui.wizzard

## Class StepSerie

- java.lang.Object
- - de.esprit.common.gui.wizzard.StepSerie

- All Implemented Interfaces:
    WizzardEvent.Source

      public class StepSerie
      extends java.lang.Object
      implements WizzardEvent.Source

  This class is a container for the steps to be done by the wizzard. It maintains a stepIndex and fires a WizzardEvent, when a step has been done or undone.
  Author:
    Rainer Buesch

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StepSerie()`
    `StepSerie(StepEntry[] entries)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addEntry(StepEntry entry)`
    `void` | `addWizzardListener(WizzardEvent.Listener l)` Register as a listener for this event type.
    `boolean` | `executeAction()` Executes the edit action for the current state.
    `StepEntry` | `getCurrentEntry()` Returns the StepEntry object of the current edit state.
    `int` | `getCurrentStepIndex()` Returns the current step-index.
    `StepEntry[]` | `getEntries()`
    `StepEntry` | `getEntry(int i)` Returns the StepEntry of the i-th edit-state.
    `int` | `getEntryCount()`
    `java.lang.String` | `getHelpText()` Returns the help text of the current StepEntry
    `boolean` | `hasFinished()` Returns true if all steps have been checked as done.
    `void` | `init()` Initializes to the first step and fires an WizzardEvent.
    `boolean` | `isFinishable()` Returns false if any of the remaining actions apart from the current is mandatory.
    `void` | `lockState()` Locks the current state - so the next call of setNextState() will be refused.
    `void` | `removeWizzardListener(WizzardEvent.Listener l)` Deregister the listener.
    `void` | `reset()` Rolls back to the initial state by undoing all actions and fires an WizzardEvent.
    `boolean` | `setCurrentStepIndex(int index)` Sets the current state to the given target state by rolling the current state forward or backward respectively.
    `boolean` | `setNextState()` Steps forward to the next step to perform.
    `void` | `setPreviousState()` Steps backwards to the previous step.
    `void` | `unlockState()` Unlocks the current state.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StepSerie

          public StepSerie()

    - #### StepSerie

          public StepSerie(StepEntry[] entries)

  - ### Method Detail

    - #### addEntry

          public void addEntry(StepEntry entry)

    - #### getEntries

          public StepEntry[] getEntries()

    - #### getEntryCount

          public int getEntryCount()

    - #### getEntry

          public StepEntry getEntry(int i)

      Returns the StepEntry of the i-th edit-state.

    - #### getCurrentEntry

          public StepEntry getCurrentEntry()

      Returns the StepEntry object of the current edit state.

    - #### getHelpText

          public java.lang.String getHelpText()

      Returns the help text of the current StepEntry

    - #### getCurrentStepIndex

          public int getCurrentStepIndex()

      Returns the current step-index.

    - #### setCurrentStepIndex

          public boolean setCurrentStepIndex(int index)

      Sets the current state to the given target state by rolling the current state forward or backward respectively.

    - #### setNextState

          public boolean setNextState()

      Steps forward to the next step to perform.

    - #### setPreviousState

          public void setPreviousState()

      Steps backwards to the previous step. Doing so calls the appropriate undo-action of the previous state.

    - #### executeAction

          public boolean executeAction()

      Executes the edit action for the current state.

    - #### init

          public void init()

      Initializes to the first step and fires an WizzardEvent. This is needed to also to initalize all listeners.

    - #### reset

          public void reset()

      Rolls back to the initial state by undoing all actions and fires an WizzardEvent.

    - #### unlockState

          public void unlockState()

      Unlocks the current state.
      See Also:
        `lockState()`

    - #### lockState

          public void lockState()

      Locks the current state - so the next call of setNextState() will be refused. Use unlockState() for unlocking again.
      See Also:
        `unlockState()`

    - #### isFinishable

          public boolean isFinishable()

      Returns false if any of the remaining actions apart from the current is mandatory.

    - #### hasFinished

          public boolean hasFinished()

      Returns true if all steps have been checked as done.

    - #### addWizzardListener

          public void addWizzardListener(WizzardEvent.Listener l)

      Description copied from interface: `WizzardEvent.Source`
      Register as a listener for this event type.
      Specified by:
        `addWizzardListener` in interface `WizzardEvent.Source`

    - #### removeWizzardListener

          public void removeWizzardListener(WizzardEvent.Listener l)

      Description copied from interface: `WizzardEvent.Source`
      Deregister the listener.
      Specified by:
        `removeWizzardListener` in interface `WizzardEvent.Source`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.