java.lang.Object
bayern.steinbrecher.wizard.WizardController
- All Implemented Interfaces:
javafx.fxml.Initializable
public class WizardController
extends java.lang.Object
implements javafx.fxml.Initializable
Contains the controller of the wizard.
- Author:
- Stefan Huber
-
Property Summary
Properties Type Property Description javafx.beans.property.ReadOnlyBooleanPropertyatBeginningProperty containing a boolean value representing whether the current page shown is the first one.javafx.beans.property.ReadOnlyBooleanPropertyatFinishProperty containing a boolean value representing whether the current page shown is a last one.javafx.beans.property.ReadOnlyBooleanPropertychangingPageReturns the property holding whether the current page is currently changed.javafx.beans.property.ReadOnlyObjectProperty<WizardPage<?>>currentPageReturns the property holding the currently shown page.javafx.beans.property.ReadOnlyBooleanPropertyfinishedReturns the property representing whether the wizard is finished.javafx.beans.property.MapProperty<java.lang.String,WizardPage<?>>pagesReturns the property holding all pages visitable. -
Constructor Summary
Constructors Constructor Description WizardController() -
Method Summary
Modifier and Type Method Description javafx.beans.property.ReadOnlyBooleanPropertyatBeginningProperty()Property containing a boolean value representing whether the current page shown is the first one.javafx.beans.property.ReadOnlyBooleanPropertyatFinishProperty()Property containing a boolean value representing whether the current page shown is a last one.javafx.beans.property.ReadOnlyBooleanPropertychangingPageProperty()Returns the property holding whether the current page is currently changed.javafx.beans.property.ReadOnlyObjectProperty<WizardPage<?>>currentPageProperty()Returns the property holding the currently shown page.javafx.beans.property.ReadOnlyBooleanPropertyfinishedProperty()Returns the property representing whether the wizard is finished.WizardPage<?>getCurrentPage()Returns the currently shown page.java.util.Map<java.lang.String,WizardPage<?>>getPages()Returns all visitable pages.java.util.Optional<java.util.Map<java.lang.String,?>>getResults()Returns the results of all pages visited in a sequence to an end.voidinitialize(java.net.URL location, java.util.ResourceBundle resources)booleanisAtBeginning()Returns a boolean value representing whether the current page shown is the first one.booleanisAtFinish()Returns a boolean value representing whether the current page shown is a last one.booleanisChangingPage()Checks whether this wizard is currently changing its page.booleanisFinished()Checks whether the wizard is finished.javafx.beans.property.MapProperty<java.lang.String,WizardPage<?>>pagesProperty()Returns the property holding all pages visitable.voidput(java.lang.String key, WizardPage<?> page)Adds the given page to the wizard and replaces pages with the same key but only if the page was not already visited.voidsetPages(java.util.Map<java.lang.String,WizardPage<?>> pages)Sets a new map of visitable pages.
-
Property Details
-
pages
Returns the property holding all pages visitable.- See Also:
getPages(),setPages(Map)
-
finished
public javafx.beans.property.ReadOnlyBooleanProperty finishedPropertyReturns the property representing whether the wizard is finished. NOTE: It is not finished when it was closed without using the "finish" button.- See Also:
isFinished()
-
atBeginning
public javafx.beans.property.ReadOnlyBooleanProperty atBeginningPropertyProperty containing a boolean value representing whether the current page shown is the first one.- See Also:
isAtBeginning()
-
atFinish
public javafx.beans.property.ReadOnlyBooleanProperty atFinishPropertyProperty containing a boolean value representing whether the current page shown is a last one.- See Also:
isAtFinish()
-
currentPage
Returns the property holding the currently shown page.- Returns:
- The property holding the currently shown page.
-
changingPage
public javafx.beans.property.ReadOnlyBooleanProperty changingPagePropertyReturns the property holding whether the current page is currently changed.- See Also:
isChangingPage()
-
-
Constructor Details
-
WizardController
public WizardController()
-
-
Method Details
-
initialize
public void initialize(java.net.URL location, java.util.ResourceBundle resources)- Specified by:
initializein interfacejavafx.fxml.Initializable
-
pagesProperty
Returns the property holding all pages visitable.- See Also:
getPages(),setPages(Map)
-
getPages
Returns all visitable pages.- Returns:
- All visitable pages.
-
setPages
Sets a new map of visitable pages. NOTE: Calling this method causes the wizard to reset to the first page and clear the history.- Parameters:
pages- The map of pages to set.
-
put
Adds the given page to the wizard and replaces pages with the same key but only if the page was not already visited. This method can be used if a page of the wizard is depending on the result of a previous one. NOTE: The size ofpageis not considered anymore afterstart(...)was called.- Parameters:
key- The key the page is associated with.page- The page to add to the wizard.
-
finishedProperty
public javafx.beans.property.ReadOnlyBooleanProperty finishedProperty()Returns the property representing whether the wizard is finished. NOTE: It is not finished when it was closed without using the "finish" button.- See Also:
isFinished()
-
isFinished
public boolean isFinished()Checks whether the wizard is finished. NOTE: It is not finished when it was closed without using the "finish" button.- Returns:
trueonly if the wizard is finished.
-
atBeginningProperty
public javafx.beans.property.ReadOnlyBooleanProperty atBeginningProperty()Property containing a boolean value representing whether the current page shown is the first one.- See Also:
isAtBeginning()
-
isAtBeginning
public boolean isAtBeginning()Returns a boolean value representing whether the current page shown is the first one.- Returns:
trueonly if the current page is the first one.
-
atFinishProperty
public javafx.beans.property.ReadOnlyBooleanProperty atFinishProperty()Property containing a boolean value representing whether the current page shown is a last one.- See Also:
isAtFinish()
-
isAtFinish
public boolean isAtFinish()Returns a boolean value representing whether the current page shown is a last one.- Returns:
trueonly if the current page is a last one.
-
currentPageProperty
Returns the property holding the currently shown page.- Returns:
- The property holding the currently shown page.
-
getCurrentPage
Returns the currently shown page.- Returns:
- The currently shown page.
-
changingPageProperty
public javafx.beans.property.ReadOnlyBooleanProperty changingPageProperty()Returns the property holding whether the current page is currently changed.- See Also:
isChangingPage()
-
isChangingPage
public boolean isChangingPage()Checks whether this wizard is currently changing its page.- Returns:
trueonly if this wizard is currently changing its page.
-
getResults
public java.util.Optional<java.util.Map<java.lang.String,?>> getResults()Returns the results of all pages visited in a sequence to an end.- Returns:
Optional.empty()only if the wizard is not finished yet, otherwise the results of the visited pages.- Throws:
IllegalCallableException- Only thrown if thrown by one of the result functions of the visited pages.
-