Package bayern.steinbrecher.wizard
Class EmbeddedWizardPage<T extends java.util.Optional<?>>
java.lang.Object
bayern.steinbrecher.wizard.EmbeddedWizardPage<T>
- Type Parameters:
T- The return type of the result represented by the page.
public final class EmbeddedWizardPage<T extends java.util.Optional<?>>
extends java.lang.Object
Represents a page of the wizard.
- Since:
- 1.0
- Author:
- Stefan Huber
-
Property Summary
Properties Type Property Description @NotNull javafx.beans.property.ReadOnlyBooleanPropertyhasNextFunctionReturns the property holdingtrueonly if this page has anextFunction.@NotNull javafx.beans.property.ReadOnlyProperty<java.util.function.Supplier<java.lang.String>>nextFunctionThe property containing the function calculating which page to show next.@NotNull javafx.beans.property.ReadOnlyBooleanPropertyvalidReturns the property representing whether this page has valid input. -
Field Summary
Fields Modifier and Type Field Description static java.lang.StringFIRST_PAGE_KEYThe key of the page to be used as first one. -
Constructor Summary
Constructors Constructor Description EmbeddedWizardPage(@NotNull WizardPage<T,?> page, @Nullable java.util.function.Supplier<java.lang.String> nextFunction, boolean finish) -
Method Summary
Modifier and Type Method Description @Nullable java.util.function.Supplier<java.lang.String>getNextFunction()Returns the function calculating the key of the next page.TgetResult()@NotNull javafx.scene.layout.PanegetRoot()Returns the pane containing all controls.@NotNull javafx.beans.property.ReadOnlyBooleanPropertyhasNextFunctionProperty()Returns the property holdingtrueonly if this page has anextFunction.booleanisFinish()Returns whether this page is a last one.booleanisHasNextFunction()Checks whether this page has anextFunction.booleanisValid()Returns whether the current input of this page is valid.voidmakeFinishPage(boolean finish, @Nullable java.util.function.Supplier<java.lang.String> nextFunction)@NotNull javafx.beans.property.ReadOnlyProperty<java.util.function.Supplier<java.lang.String>>nextFunctionProperty()The property containing the function calculating which page to show next.@NotNull javafx.beans.property.ReadOnlyBooleanPropertyvalidProperty()Returns the property representing whether this page has valid input.
-
Property Details
-
nextFunction
@NotNull public @NotNull javafx.beans.property.ReadOnlyProperty<java.util.function.Supplier<java.lang.String>> nextFunctionPropertyThe property containing the function calculating which page to show next.- See Also:
getNextFunction()
-
valid
@NotNull public @NotNull javafx.beans.property.ReadOnlyBooleanProperty validPropertyReturns the property representing whether this page has valid input.- See Also:
isValid()
-
hasNextFunction
@NotNull public @NotNull javafx.beans.property.ReadOnlyBooleanProperty hasNextFunctionPropertyReturns the property holdingtrueonly if this page has anextFunction.- See Also:
isHasNextFunction()
-
-
Field Details
-
FIRST_PAGE_KEY
public static final java.lang.String FIRST_PAGE_KEYThe key of the page to be used as first one.- See Also:
- Constant Field Values
-
-
Constructor Details
-
EmbeddedWizardPage
public EmbeddedWizardPage(@NotNull @NotNull WizardPage<T,?> page, @Nullable @Nullable java.util.function.Supplier<java.lang.String> nextFunction, boolean finish) throws javafx.fxml.LoadException- Throws:
javafx.fxml.LoadException
-
-
Method Details
-
getRoot
@NotNull public @NotNull javafx.scene.layout.Pane getRoot()Returns the pane containing all controls.- Returns:
- The pane containing all controls.
-
nextFunctionProperty
@NotNull public @NotNull javafx.beans.property.ReadOnlyProperty<java.util.function.Supplier<java.lang.String>> nextFunctionProperty()The property containing the function calculating which page to show next.- 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
nullif this page has no next one.
-
isFinish
public boolean isFinish()Returns whether this page is a last one.- Returns:
trueonly if this page is a last one.
-
makeFinishPage
public void makeFinishPage(boolean finish, @Nullable @Nullable java.util.function.Supplier<java.lang.String> nextFunction) -
getResult
-
validProperty
@NotNull public @NotNull 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:
trueonly if the current input of this page is valid.
-
hasNextFunctionProperty
@NotNull public @NotNull javafx.beans.property.ReadOnlyBooleanProperty hasNextFunctionProperty()Returns the property holdingtrueonly if this page has anextFunction.- See Also:
isHasNextFunction()
-
isHasNextFunction
public boolean isHasNextFunction()Checks whether this page has anextFunction.- Returns:
- Returns
trueonly if this page has anextFunction. - See Also:
nextFunctionProperty()
-