Oracle JEWT 4.2.10

oracle.bali.ewt.wizard.dWizard
Class NullSequence

java.lang.Object
  |
  +--oracle.bali.ewt.wizard.dWizard.NullSequence
All Implemented Interfaces:
WizardSequence

public class NullSequence
extends java.lang.Object
implements WizardSequence

Provides an implementation of an empty sequence, namely one that contains no pages. Obviously, NullSequences aren't useful as a sequence for an entire wizard, but they are essential as subsequences.

NullSequences are especially useful when used with DynamicSequences, where they can be used to indicate "skip over this sequence".

NullSequences are "singletons"; only one instance exists, and it can be reused in many sequences simultaneously.

See Also:
DynamicSequence

Method Summary
 WizardPage getCurrentPage()
          Returns the current page of the wizard sequence.
 WizardPage getNextPage()
          Returns the page immediately after the current page, or null if there are no more pages.
 int getPageCount()
          Returns the number of pages in this sequence.
 WizardPage getPreviousPage()
          Returns the page immediately before the current page, or null if there are no more pages.
static WizardSequence getWizardSequence()
          Returns a shareable NullSequence instance.
 void goBackwards()
          Moves the sequence back to its previous page.
 void goForward()
          Advances the sequence to its next page.
 void goToFirstPage()
          Returns the sequence to its first page.
 void goToLastPage()
          Returns the sequence to its last page.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getWizardSequence

public static WizardSequence getWizardSequence()
Returns a shareable NullSequence instance.

goToFirstPage

public void goToFirstPage()
Returns the sequence to its first page. A no-op for NullSequences.
Specified by:
goToFirstPage in interface WizardSequence

goToLastPage

public void goToLastPage()
Returns the sequence to its last page. A no-op for NullSequences.
Specified by:
goToLastPage in interface WizardSequence

goForward

public void goForward()
Advances the sequence to its next page. Always throws an exception.
Specified by:
goForward in interface WizardSequence
Throws:
java.util.NoSuchElementException - if there are no more pages

goBackwards

public void goBackwards()
Moves the sequence back to its previous page. Always throws an exception.
Specified by:
goBackwards in interface WizardSequence
Throws:
java.util.NoSuchElementException - if there are no more pages

getNextPage

public WizardPage getNextPage()
Returns the page immediately after the current page, or null if there are no more pages. NullSequences always return null.
Specified by:
getNextPage in interface WizardSequence

getPreviousPage

public WizardPage getPreviousPage()
Returns the page immediately before the current page, or null if there are no more pages. NullSequences always return null.
Specified by:
getPreviousPage in interface WizardSequence

getCurrentPage

public WizardPage getCurrentPage()
Returns the current page of the wizard sequence. NullSequences always return null.
Specified by:
getCurrentPage in interface WizardSequence

getPageCount

public int getPageCount()
Returns the number of pages in this sequence.
Specified by:
getPageCount in interface WizardSequence

Oracle JEWT 4.2.10