Package bayern.steinbrecher.wizard
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 theEmbeddedWizardPage.C- The type of the controller used by theWizardPage.
- 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.ReadOnlyBooleanPropertyhasNextFunction@NotNull javafx.beans.property.ReadOnlyProperty<java.util.function.Supplier<java.lang.String>>nextFunctionjavafx.beans.property.ReadOnlyBooleanPropertyvalid -
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 Modifier Constructor Description protectedWizardPage(@NotNull java.lang.String fxmlPath, @Nullable java.util.ResourceBundle bundle) -
Method Summary
Modifier and Type Method Description protected voidafterControllerInitialized()This method is executed after the FXML is loaded and right after the corresponding controller is set.protected CgetController()@Nullable java.util.function.Supplier<java.lang.String>getNextFunction()Returns the function calculating the key of the next page.TgetResult()@NotNull javafx.beans.property.ReadOnlyBooleanPropertyhasNextFunctionProperty()booleanisFinish()booleanisHasNextFunction()Gets the value of the property hasNextFunction.booleanisValid()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.voidsetFinishAndNext(boolean finish, @Nullable java.util.function.Supplier<java.lang.String> nextFunction)javafx.beans.property.ReadOnlyBooleanPropertyvalidProperty()
-
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
-
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
-
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
-
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
nullif 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-trueonly if this page is a last one.nextFunction- The function calculating the name of the next page. In casefinishistruethis value is allowed to benull.- 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 oneWizardPageas the input for anotherWizardPage. However, if there are multipleWizardPages that depend on previousWizardPages then using this method results in heavily nested and thus hard to read source code. Instead if aWizardPagedepends on input of otherWizardPages it should either provide setters that can be called in the next-function or provide a constructor that has parameters of typeFutureonly. This allows to avoid this method entirely clarify the structure of theWizard.- Returns:
- A
CompletableFutureobject which contains the dynamically generated next page as soon as theWizardthis 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
-