bayern.steinbrecher.wizard.pages.Selection 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.
/*
* Copyright (C) 2020 Stefan Huber
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
package bayern.steinbrecher.wizard.pages;
import bayern.steinbrecher.wizard.WizardPage;
import org.jetbrains.annotations.NotNull;
import java.util.Objects;
import java.util.Optional;
import java.util.ResourceBundle;
import java.util.Set;
/**
* @param The type of the attributes being able to select.
* @author Stefan Huber
* @since 1.4
*/
public class Selection>
extends WizardPage>, SelectionController> {
private final Set options;
/**
* Creates a new page which represents each given option as selectable {@link javafx.scene.control.CheckBox} and
* adds a search box which allows to filter the visible options.
*/
public Selection(@NotNull Set options) {
super("Selection.fxml", ResourceBundle.getBundle("bayern.steinbrecher.wizard.pages.Selection"));
this.options = Objects.requireNonNull(options);
}
@Override
protected void afterControllerInitialized() {
getController().setOptions(options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy