Class WizardController

java.lang.Object
bayern.steinbrecher.wizard.WizardController

public final class WizardController
extends java.lang.Object
Contains the controller of the wizard.
Since:
1.0
Author:
Stefan Huber
  • Property Summary

    Properties 
    Type Property Description
    javafx.beans.property.ReadOnlyBooleanProperty atBeginning
    Property containing a boolean value representing whether the current page shown is the first one.
    javafx.beans.property.ReadOnlyBooleanProperty atFinish
    Property containing a boolean value representing whether the current page shown is a last one.
    javafx.beans.property.ReadOnlyBooleanProperty changingPage
    Returns the property holding whether the current page is currently changed.
    javafx.beans.property.ReadOnlyObjectProperty<WizardPage<?>> currentPage
    Returns the property holding the currently shown page.
    javafx.beans.property.ReadOnlyBooleanProperty finished
    Returns the property representing whether the wizard is finished.
    javafx.beans.property.MapProperty<java.lang.String,​WizardPage<?>> pages
    Returns the property holding all pages visitable.
  • Constructor Summary

    Constructors 
    Constructor Description
    WizardController()  
  • Method Summary

    Modifier and Type Method Description
    javafx.beans.property.ReadOnlyBooleanProperty atBeginningProperty()
    Property containing a boolean value representing whether the current page shown is the first one.
    javafx.beans.property.ReadOnlyBooleanProperty atFinishProperty()
    Property containing a boolean value representing whether the current page shown is a last one.
    javafx.beans.property.ReadOnlyBooleanProperty changingPageProperty()
    Returns the property holding whether the current page is currently changed.
    javafx.beans.property.ReadOnlyObjectProperty<WizardPage<?>> currentPageProperty()
    Returns the property holding the currently shown page.
    javafx.beans.property.ReadOnlyBooleanProperty finishedProperty()
    Returns the property representing whether the wizard is finished.
    WizardPage<?> getCurrentPage()
    Returns the currently shown page.
    java.util.Map<java.lang.String,​WizardPage<?>> getPages()
    Returns all visitable pages.
    java.util.Optional<java.util.Map<java.lang.String,​?>> getResults()
    Returns the results of all pages visited in a sequence to an end.
    boolean isAtBeginning()
    Returns a boolean value representing whether the current page shown is the first one.
    boolean isAtFinish()
    Returns a boolean value representing whether the current page shown is a last one.
    boolean isChangingPage()
    Checks whether this wizard is currently changing its page.
    boolean isFinished()
    Checks whether the wizard is finished.
    javafx.beans.property.MapProperty<java.lang.String,​WizardPage<?>> pagesProperty()
    Returns the property holding all pages visitable.
    void put​(java.lang.String key, WizardPage<?> page)
    Adds the given page to the wizard and replaces pages with the same key but only if the page was not already visited.
    void setPages​(java.util.Map<java.lang.String,​WizardPage<?>> pages)
    Sets a new map of visitable pages.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Property Details

    • pages

      public javafx.beans.property.MapProperty<java.lang.String,​WizardPage<?>> pagesProperty
      Returns the property holding all pages visitable.
      See Also:
      getPages(), setPages(Map)
    • finished

      public javafx.beans.property.ReadOnlyBooleanProperty finishedProperty
      Returns the property representing whether the wizard is finished. NOTE: It is not finished when it was closed without using the "finish" button.
      See Also:
      isFinished()
    • atBeginning

      public javafx.beans.property.ReadOnlyBooleanProperty atBeginningProperty
      Property containing a boolean value representing whether the current page shown is the first one.
      See Also:
      isAtBeginning()
    • atFinish

      public javafx.beans.property.ReadOnlyBooleanProperty atFinishProperty
      Property containing a boolean value representing whether the current page shown is a last one.
      See Also:
      isAtFinish()
    • currentPage

      public javafx.beans.property.ReadOnlyObjectProperty<WizardPage<?>> currentPageProperty
      Returns the property holding the currently shown page.
      Returns:
      The property holding the currently shown page.
    • changingPage

      public javafx.beans.property.ReadOnlyBooleanProperty changingPageProperty
      Returns the property holding whether the current page is currently changed.
      See Also:
      isChangingPage()
  • Constructor Details

  • Method Details

    • pagesProperty

      public javafx.beans.property.MapProperty<java.lang.String,​WizardPage<?>> pagesProperty()
      Returns the property holding all pages visitable.
      See Also:
      getPages(), setPages(Map)
    • getPages

      public java.util.Map<java.lang.String,​WizardPage<?>> getPages()
      Returns all visitable pages.
      Returns:
      All visitable pages.
    • setPages

      public void setPages​(java.util.Map<java.lang.String,​WizardPage<?>> pages)
      Sets a new map of visitable pages. NOTE: Calling this method causes the wizard to reset to the first page and clear the history.
      Parameters:
      pages - The map of pages to set.
    • put

      public void put​(java.lang.String key, WizardPage<?> page)
      Adds the given page to the wizard and replaces pages with the same key but only if the page was not already visited. This method can be used if a page of the wizard is depending on the result of a previous one. NOTE: The size of page is not considered anymore after start(...) was called.
      Parameters:
      key - The key the page is associated with.
      page - The page to add to the wizard.
    • finishedProperty

      public javafx.beans.property.ReadOnlyBooleanProperty finishedProperty()
      Returns the property representing whether the wizard is finished. NOTE: It is not finished when it was closed without using the "finish" button.
      See Also:
      isFinished()
    • isFinished

      public boolean isFinished()
      Checks whether the wizard is finished. NOTE: It is not finished when it was closed without using the "finish" button.
      Returns:
      true only if the wizard is finished.
    • atBeginningProperty

      public javafx.beans.property.ReadOnlyBooleanProperty atBeginningProperty()
      Property containing a boolean value representing whether the current page shown is the first one.
      See Also:
      isAtBeginning()
    • isAtBeginning

      public boolean isAtBeginning()
      Returns a boolean value representing whether the current page shown is the first one.
      Returns:
      true only if the current page is the first one.
    • atFinishProperty

      public javafx.beans.property.ReadOnlyBooleanProperty atFinishProperty()
      Property containing a boolean value representing whether the current page shown is a last one.
      See Also:
      isAtFinish()
    • isAtFinish

      public boolean isAtFinish()
      Returns a boolean value representing whether the current page shown is a last one.
      Returns:
      true only if the current page is a last one.
    • currentPageProperty

      public javafx.beans.property.ReadOnlyObjectProperty<WizardPage<?>> currentPageProperty()
      Returns the property holding the currently shown page.
      Returns:
      The property holding the currently shown page.
    • getCurrentPage

      public WizardPage<?> getCurrentPage()
      Returns the currently shown page.
      Returns:
      The currently shown page.
    • changingPageProperty

      public javafx.beans.property.ReadOnlyBooleanProperty changingPageProperty()
      Returns the property holding whether the current page is currently changed.
      See Also:
      isChangingPage()
    • isChangingPage

      public boolean isChangingPage()
      Checks whether this wizard is currently changing its page.
      Returns:
      true only if this wizard is currently changing its page.
    • getResults

      public java.util.Optional<java.util.Map<java.lang.String,​?>> getResults()
      Returns the results of all pages visited in a sequence to an end.
      Returns:
      Optional.empty() only if the wizard is not finished yet, otherwise the results of the visited pages.
      Throws:
      IllegalCallableException - Only thrown if thrown by one of the result functions of the visited pages.