- java.lang.Object
-
- org.controlsfx.dialog.Wizard.LinearFlow
-
- All Implemented Interfaces:
Wizard.Flow
- Enclosing class:
- Wizard
public static class Wizard.LinearFlow extends Object implements Wizard.Flow
LinearFlow is an implementation of theWizard.Flow
interface, designed to support the most common type of wizard flow - namely, a linear wizard page flow (i.e. through all pages in the order that they are specified). Therefore, thisWizard.Flow
implementation simply traverses a collections ofWizardPanes
.For example of how to use this API, please refer to the
Wizard
documentation- See Also:
Wizard
,WizardPane
-
-
Constructor Summary
Constructors Constructor Description LinearFlow(Collection<WizardPane> pages)
Creates a new LinearFlow instance that will allow for stepping through the given collection ofWizardPane
instances.LinearFlow(WizardPane... pages)
Creates a new LinearFlow instance that will allow for stepping through the given varargs array ofWizardPane
instances.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<WizardPane>
advance(WizardPane currentPage)
Advances the wizard to the next page if possible.boolean
canAdvance(WizardPane currentPage)
Check if advancing to the next page is possible
-
-
-
Constructor Detail
-
LinearFlow
public LinearFlow(Collection<WizardPane> pages)
Creates a new LinearFlow instance that will allow for stepping through the given collection ofWizardPane
instances.
-
LinearFlow
public LinearFlow(WizardPane... pages)
Creates a new LinearFlow instance that will allow for stepping through the given varargs array ofWizardPane
instances.
-
-
Method Detail
-
advance
public Optional<WizardPane> advance(WizardPane currentPage)
Advances the wizard to the next page if possible.- Specified by:
advance
in interfaceWizard.Flow
- Parameters:
currentPage
- The current wizard page- Returns:
Optional
value containing the next wizard page.
-
canAdvance
public boolean canAdvance(WizardPane currentPage)
Check if advancing to the next page is possible- Specified by:
canAdvance
in interfaceWizard.Flow
- Parameters:
currentPage
- The current wizard page- Returns:
- true if it is possible to advance to the next page, false otherwise.
-
-