java.lang.Object
com.dua3.utility.fx.controls.WizardDialogBuilder
A builder class for constructing a
WizardDialog instance.
This builder helps in setting up the title and configuring the pages
of the wizard dialog.-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbuild()Constructs and returns a new instance ofWizardDialogwith the configured title and pages.Retrieves the start page of the wizard dialog being built.<D extends InputDialogPane<R>,B extends PaneBuilder<D, B, R>, R>
WizardDialogBuilderAdds a page to the wizard dialog.voidsetStartPage(String startPage) Sets the start page for the wizard dialog.Displays the constructed wizard dialog and waits for the user to close it.Sets the title for the wizard dialog being built.
-
Methodendetails
-
title
Sets the title for the wizard dialog being built.- Parameter:
title- The title to set for the wizard dialog.- Gibt zurück:
- The current instance of
WizardDialogBuilder, for method chaining.
-
page
public <D extends InputDialogPane<R>,B extends PaneBuilder<D, WizardDialogBuilder pageB, R>, R> (String name, B builder) Adds a page to the wizard dialog.- Typparameter:
D- the type of the input dialog paneB- the type of the abstract pane builderR- the type of the result produced by the pane- Parameter:
name- the name of the page to addbuilder- the builder used to create and configure the pane- Gibt zurück:
- the current instance of
WizardDialogBuilder, for method chaining
-
showAndWait
Displays the constructed wizard dialog and waits for the user to close it.- Gibt zurück:
- An Optional containing a map with the results from the wizard dialog if the dialog was completed, or an empty Optional if the dialog was canceled or closed without completion.
-
build
Constructs and returns a new instance ofWizardDialogwith the configured title and pages.The pages are linked sequentially based on their insertion order. If a page does not have a "next" page set, it will be linked to the subsequent page in the insertion order.
- Gibt zurück:
- A new
WizardDialoginstance with the configured title and pages.
-
getStartPage
Retrieves the start page of the wizard dialog being built.- Gibt zurück:
- The name of the start page as a String.
-
setStartPage
Sets the start page for the wizard dialog.- Parameter:
startPage- The name of the page to be set as the start page.
-