Class WizardPage<T>

java.lang.Object
bayern.steinbrecher.wizard.WizardPage<T>
Type Parameters:
T - The return type of the result represented by the page.

public final class WizardPage<T>
extends java.lang.Object
Represents a page of the wizard.
Since:
1.0
Author:
Stefan Huber
  • Property Summary

    Properties 
    Type Property Description
    javafx.beans.property.ReadOnlyBooleanProperty hasNextFunction
    Returns the property holding true only if this page has a nextFunction.
    javafx.beans.property.Property<java.util.concurrent.Callable<java.lang.String>> nextFunction
    The property containing the function calculating which page to show next.
    javafx.beans.property.ReadOnlyBooleanProperty valid
    Returns the property representing whether this page has valid input.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static java.lang.String FIRST_PAGE_KEY
    The key of the page to be used as first one.
  • Constructor Summary

    Constructors 
    Constructor Description
    WizardPage​(javafx.scene.layout.Pane root, java.util.concurrent.Callable<java.lang.String> nextFunction, boolean finish, java.util.concurrent.Callable<T> resultFunction)
    Creates a new page with given params.
    WizardPage​(javafx.scene.layout.Pane root, java.util.concurrent.Callable<java.lang.String> nextFunction, boolean finish, java.util.concurrent.Callable<T> resultFunction, javafx.beans.value.ObservableValue<? extends java.lang.Boolean> valid)
    Creates a new page with given params.
  • Method Summary

    Modifier and Type Method Description
    java.util.concurrent.Callable<java.lang.String> getNextFunction()
    Returns the function calculating the key of the next page.
    java.util.concurrent.Callable<T> getResultFunction()
    Returns the function calculating the result this page represents.
    javafx.scene.layout.Pane getRoot()
    Returns the pane containing all controls.
    javafx.beans.property.ReadOnlyBooleanProperty hasNextFunctionProperty()
    Returns the property holding true only if this page has a nextFunction.
    boolean isFinish()
    Returns whether this page is a last one.
    boolean isHasNextFunction()
    Checks whether this page has a nextFunction.
    boolean isValid()
    Returns whether the current input of this page is valid.
    javafx.beans.property.Property<java.util.concurrent.Callable<java.lang.String>> nextFunctionProperty()
    The property containing the function calculating which page to show next.
    void setFinish​(boolean finish)
    Changes whether this page is a last one.
    void setNextFunction​(java.util.concurrent.Callable<java.lang.String> nextFunction)
    Sets a new function calculating the key of the next page.
    void setValidBinding​(javafx.beans.value.ObservableValue<? extends java.lang.Boolean> validBinding)
    Sets a new binding to bind this pages valid property to.
    javafx.beans.property.ReadOnlyBooleanProperty validProperty()
    Returns the property representing whether this page has valid input.

    Methods inherited from class java.lang.Object

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

    • nextFunction

      public javafx.beans.property.Property<java.util.concurrent.Callable<java.lang.String>> nextFunctionProperty
      The property containing the function calculating which page to show next.
      See Also:
      getNextFunction(), setNextFunction(Callable)
    • valid

      public javafx.beans.property.ReadOnlyBooleanProperty validProperty
      Returns the property representing whether this page has valid input.
      See Also:
      isValid()
    • hasNextFunction

      public javafx.beans.property.ReadOnlyBooleanProperty hasNextFunctionProperty
      Returns the property holding true only if this page has a nextFunction.
      See Also:
      isHasNextFunction()
  • Field Details

  • Constructor Details

    • WizardPage

      public WizardPage​(javafx.scene.layout.Pane root, java.util.concurrent.Callable<java.lang.String> nextFunction, boolean finish, java.util.concurrent.Callable<T> resultFunction, javafx.beans.value.ObservableValue<? extends java.lang.Boolean> valid)
      Creates a new page with given params.
      Parameters:
      root - The root pane containing all controls.
      nextFunction - The function calculating the name of th enext page.
      finish - true only if this page is a last one.
      resultFunction - The function calculating the result this page represents.
      valid - A binding to bind this pages valid property to.
    • WizardPage

      public WizardPage​(javafx.scene.layout.Pane root, java.util.concurrent.Callable<java.lang.String> nextFunction, boolean finish, java.util.concurrent.Callable<T> resultFunction)
      Creates a new page with given params. The valid property always contains true.
      Parameters:
      root - The root pane containing all controls.
      nextFunction - The function calculating the name of the next page.
      finish - true only if this page is a last one.
      resultFunction - The function calculating the result this page represents.
  • Method Details

    • getRoot

      public javafx.scene.layout.Pane getRoot()
      Returns the pane containing all controls.
      Returns:
      The pane containing all controls.
    • nextFunctionProperty

      public javafx.beans.property.Property<java.util.concurrent.Callable<java.lang.String>> nextFunctionProperty()
      The property containing the function calculating which page to show next.
      See Also:
      getNextFunction(), setNextFunction(Callable)
    • getNextFunction

      public java.util.concurrent.Callable<java.lang.String> getNextFunction()
      Returns the function calculating the key of the next page.
      Returns:
      The function calculating the key of the next page. Returns null if this page has no next one.
    • setNextFunction

      public void setNextFunction​(java.util.concurrent.Callable<java.lang.String> nextFunction)
      Sets a new function calculating the key of the next page.
      Parameters:
      nextFunction - The function calculating the key of the next page.
    • isFinish

      public boolean isFinish()
      Returns whether this page is a last one.
      Returns:
      true only if this page is a last one.
    • setFinish

      public void setFinish​(boolean finish)
      Changes whether this page is a last one.
      Parameters:
      finish - true if this page has to be a last one.
    • getResultFunction

      public java.util.concurrent.Callable<T> getResultFunction()
      Returns the function calculating the result this page represents.
      Returns:
      The function calculating the result this page represents.
    • setValidBinding

      public void setValidBinding​(javafx.beans.value.ObservableValue<? extends java.lang.Boolean> validBinding)
      Sets a new binding to bind this pages valid property to.
      Parameters:
      validBinding - A new binding to bind this pages valid property to.
    • validProperty

      public javafx.beans.property.ReadOnlyBooleanProperty validProperty()
      Returns the property representing whether this page has valid input.
      See Also:
      isValid()
    • isValid

      public boolean isValid()
      Returns whether the current input of this page is valid.
      Returns:
      true only if the current input of this page is valid.
    • hasNextFunctionProperty

      public javafx.beans.property.ReadOnlyBooleanProperty hasNextFunctionProperty()
      Returns the property holding true only if this page has a nextFunction.
      See Also:
      isHasNextFunction()
    • isHasNextFunction

      public boolean isHasNextFunction()
      Checks whether this page has a nextFunction.
      Returns:
      Returns true only if this page has a nextFunction.
      See Also:
      nextFunctionProperty()