bayern.steinbrecher.wizard.EmbeddedWizardPage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Wizard Show documentation
Show all versions of Wizard Show documentation
Contains a library to create dynamic and branching JavaFX wizards in an abstract way.
Comes with a predefined collection of typical wizard pages.
package bayern.steinbrecher.wizard;
import javafx.beans.property.ReadOnlyBooleanProperty;
import javafx.beans.property.ReadOnlyProperty;
import javafx.fxml.LoadException;
import javafx.scene.Parent;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Supplier;
/**
* Represents a page of the wizard.
*
* @param The return type of the result represented by the page.
* @author Stefan Huber
* @since 1.0
*/
public final class EmbeddedWizardPage> {
private final WizardPage page;
private final Parent root;
EmbeddedWizardPage(@NotNull WizardPage page) throws LoadException {
this.page = Objects.requireNonNull(page);
this.root = page.loadFXML();
}
@NotNull
public Parent getRoot() {
return root;
}
@NotNull
public ReadOnlyProperty> nextFunctionProperty() {
return page.nextFunctionProperty();
}
@Nullable
public Supplier getNextFunction() {
return nextFunctionProperty().getValue();
}
public boolean isFinish() {
return page.isFinish();
}
@NotNull
public ReadOnlyBooleanProperty validProperty() {
return page.validProperty();
}
public boolean isValid() {
return validProperty().get();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy