bayern.steinbrecher.wizard.pages.SelectionGroup 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.pages;
import bayern.steinbrecher.wizard.StandaloneWizardPage;
import com.google.common.collect.BiMap;
import javafx.scene.paint.Color;
import java.util.Map;
import java.util.Optional;
import java.util.ResourceBundle;
import java.util.Set;
import java.util.function.Supplier;
/**
* Represents a {@link Selection} which allows to select and group items.
*
* @param The type of the options to select.
* @param The type of the groups to associate items with.
* @author Stefan Huber
* @since 1.51
*/
public final class SelectionGroup, G>
extends StandaloneWizardPage>, SelectionGroupController> {
private final Supplier> options;
private final Supplier> groups;
public SelectionGroup(Set options, BiMap groups) {
this(() -> options, () -> groups);
}
/**
* @since 1.55
*/
public SelectionGroup(Supplier> options, Supplier> groups) {
super("SelectionGroup.fxml", ResourceBundle.getBundle("bayern.steinbrecher.wizard.pages.Selection"));
this.options = options;
this.groups = groups;
}
@Override
protected void afterControllerInitialized() {
getController().setGroups(groups.get());
getController().setOptions(options.get());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy