Class WizardPage<T extends java.util.Optional<?>,​C extends WizardPageController<T>>

java.lang.Object
bayern.steinbrecher.wizard.WizardPage<T,​C>
Type Parameters:
T - The type of the result of the EmbeddedWizardPage.
C - The type of the controller used by the WizardPage.
Direct Known Subclasses:
Selection, SelectionGroup, StandaloneWizardPage, TablePage

public abstract class WizardPage<T extends java.util.Optional<?>,​C extends WizardPageController<T>>
extends java.lang.Object
Represents a class which can be in a Wizard.
Since:
1.2
Author:
Stefan Huber
  • Property Summary

    Properties 
    Type Property Description
    @NotNull javafx.beans.property.ReadOnlyBooleanProperty hasNextFunction  
    @NotNull javafx.beans.property.ReadOnlyProperty<java.util.function.Supplier<java.lang.String>> nextFunction  
    javafx.beans.property.ReadOnlyBooleanProperty valid  
  • 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 
    Modifier Constructor Description
    protected WizardPage​(@NotNull java.lang.String fxmlPath, @Nullable java.util.ResourceBundle bundle)  
  • Method Summary

    Modifier and Type Method Description
    protected void afterControllerInitialized()
    This method is executed after the FXML is loaded and right after the corresponding controller is set.
    protected C getController()  
    @Nullable java.util.function.Supplier<java.lang.String> getNextFunction()
    Returns the function calculating the key of the next page.
    T getResult()  
    @NotNull javafx.beans.property.ReadOnlyBooleanProperty hasNextFunctionProperty()  
    boolean isFinish()  
    boolean isHasNextFunction()
    Gets the value of the property hasNextFunction.
    boolean isValid()
    Gets the value of the property valid.
    @NotNull javafx.beans.property.ReadOnlyProperty<java.util.function.Supplier<java.lang.String>> nextFunctionProperty()  
    <R extends java.util.Optional<?>,​ C extends WizardPageController<R>>
    java.util.concurrent.CompletableFuture<WizardPage<R,​C>>
    setFinishAndDynamicNext​(boolean finish, @Nullable java.util.function.Supplier<WizardPage<R,​C>> dynamicNextFunction, @NotNull java.lang.String pageID, @NotNull Wizard containingWizard)
    Deprecated, for removal: This API element is subject to removal in a future version.
    void setFinishAndNext​(boolean finish, @Nullable java.util.function.Supplier<java.lang.String> nextFunction)  
    javafx.beans.property.ReadOnlyBooleanProperty validProperty()  

    Methods inherited from class java.lang.Object

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

    • nextFunction

      @NotNull public @NotNull javafx.beans.property.ReadOnlyProperty<java.util.function.Supplier<java.lang.String>> nextFunctionProperty
      See Also:
      getNextFunction()
    • hasNextFunction

      @NotNull public @NotNull javafx.beans.property.ReadOnlyBooleanProperty hasNextFunctionProperty
      See Also:
      isHasNextFunction()
    • valid

      public javafx.beans.property.ReadOnlyBooleanProperty validProperty
      See Also:
      isValid()
  • Field Details

  • Constructor Details

    • WizardPage

      protected WizardPage​(@NotNull @NotNull java.lang.String fxmlPath, @Nullable @Nullable java.util.ResourceBundle bundle)
      Since:
      1.13
  • Method Details

    • afterControllerInitialized

      protected void afterControllerInitialized()
      This method is executed after the FXML is loaded and right after the corresponding controller is set. This function represents an equivalent to a FXML controllers initialize method.
      Since:
      1.8
    • getResult

      public T getResult()
    • nextFunctionProperty

      @NotNull public @NotNull javafx.beans.property.ReadOnlyProperty<java.util.function.Supplier<java.lang.String>> nextFunctionProperty()
      See Also:
      getNextFunction()
    • getNextFunction

      @Nullable public @Nullable java.util.function.Supplier<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.
    • isFinish

      public boolean isFinish()
    • setFinishAndNext

      public void setFinishAndNext​(boolean finish, @Nullable @Nullable java.util.function.Supplier<java.lang.String> nextFunction)
      Parameters:
      finish - true only if this page is a last one.
      nextFunction - The function calculating the name of the next page. In case finish is true this value is allowed to be null.
      Since:
      1.27
    • setFinishAndDynamicNext

      @Deprecated(forRemoval=true, since="1.52") public <R extends java.util.Optional<?>,​ C extends WizardPageController<R>> java.util.concurrent.CompletableFuture<WizardPage<R,​C>> setFinishAndDynamicNext​(boolean finish, @Nullable @Nullable java.util.function.Supplier<WizardPage<R,​C>> dynamicNextFunction, @NotNull @NotNull java.lang.String pageID, @NotNull @NotNull Wizard containingWizard)
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method allows to use the result of one WizardPage as the input for another WizardPage. However, if there are multiple WizardPages that depend on previous WizardPages then using this method results in heavily nested and thus hard to read source code. Instead if a WizardPage depends on input of other WizardPages it should either provide setters that can be called in the next-function or provide a constructor that has parameters of type Future only. This allows to avoid this method entirely clarify the structure of the Wizard.
      Returns:
      A CompletableFuture object which contains the dynamically generated next page as soon as the Wizard this page belongs to tries to access its next page.
      Since:
      1.27
      See Also:
      setFinishAndNext(boolean, Supplier)
    • hasNextFunctionProperty

      @NotNull public @NotNull javafx.beans.property.ReadOnlyBooleanProperty hasNextFunctionProperty()
      See Also:
      isHasNextFunction()
    • isHasNextFunction

      public boolean isHasNextFunction()
      Gets the value of the property hasNextFunction.
      Property description:
    • validProperty

      public javafx.beans.property.ReadOnlyBooleanProperty validProperty()
      See Also:
      isValid()
    • isValid

      public boolean isValid()
      Gets the value of the property valid.
      Property description:
    • getController

      protected C getController()