Class WizardPageController<T extends java.util.Optional<?>>

java.lang.Object
bayern.steinbrecher.wizard.WizardPageController<T>
Type Parameters:
T - The type of the result represented by this controller.
Direct Known Subclasses:
SelectionController, StandaloneWizardPageController

public abstract class WizardPageController<T extends java.util.Optional<?>>
extends java.lang.Object
Represents a controller of a WizardPage.
Since:
1.2
Author:
Stefan Huber
  • Property Summary

    Properties 
    Type Property Description
    @NotNull javafx.beans.property.ReadOnlyBooleanProperty valid
    A property indicating whether all input handled by this controller is valid.
  • Constructor Summary

    Constructors 
    Constructor Description
    WizardPageController()  
  • Method Summary

    Modifier and Type Method Description
    protected void bindValidProperty​(javafx.beans.value.ObservableValue<? extends java.lang.Boolean> binding)  
    protected abstract T calculateResult()
    Calculates the actual result if any.
    java.lang.String getResourceValue​(@NotNull java.lang.String key, @NotNull java.lang.Object... params)
    Returns the value behind key of the resource bundle inserted params.
    java.util.List<java.lang.String> getResourceValues​(@NotNull java.lang.String key, @NotNull java.util.List<java.lang.Object[]> params)
    Returns a list of values behind key of the resource bundle and with inserted params.
    T getResult()
    Returns the current result that the content of the page represents.
    boolean isValid()
    Gets the value of the property valid.
    @NotNull javafx.beans.property.ReadOnlyBooleanProperty validProperty()
    A property indicating whether all input handled by this controller is valid.

    Methods inherited from class java.lang.Object

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

    • valid

      @NotNull public @NotNull javafx.beans.property.ReadOnlyBooleanProperty validProperty
      A property indicating whether all input handled by this controller is valid.
      See Also:
      isValid()
  • Constructor Details

  • Method Details

    • getResourceValue

      public java.lang.String getResourceValue​(@NotNull @NotNull java.lang.String key, @NotNull @NotNull java.lang.Object... params)
      Returns the value behind key of the resource bundle inserted params.
      Parameters:
      key - The key to search for.
      params - The params to insert.
      Returns:
      The value with inserted params.
      Since:
      1.12
    • getResourceValues

      public java.util.List<java.lang.String> getResourceValues​(@NotNull @NotNull java.lang.String key, @NotNull @NotNull java.util.List<java.lang.Object[]> params)
      Returns a list of values behind key of the resource bundle and with inserted params.
      Parameters:
      key - The key to search for.
      params - The list of params to insert each in the value behind key.
      Returns:
      The list of values with inserted params.
      Since:
      1.12
    • getResult

      public T getResult()
      Returns the current result that the content of the page represents.
      Returns:
      If the content of this page is invalid this method returns Optional.empty(). Otherwise it returns the represented result.
    • calculateResult

      protected abstract T calculateResult()
      Calculates the actual result if any. It does not recognize any criteria about whether to return a result or not. This is handled by getResult().
      Returns:
      The actual result if any.
      See Also:
      getResult()
    • validProperty

      @NotNull public @NotNull javafx.beans.property.ReadOnlyBooleanProperty validProperty()
      A property indicating whether all input handled by this controller is valid.
      See Also:
      isValid()
    • isValid

      public boolean isValid()
      Gets the value of the property valid.
      Property description:
      A property indicating whether all input handled by this controller is valid.
    • bindValidProperty

      protected void bindValidProperty​(javafx.beans.value.ObservableValue<? extends java.lang.Boolean> binding)