com.dua3.utility.fx.controls.OptionsPane Maven / Gradle / Ivy
package com.dua3.utility.fx.controls;
import org.jspecify.annotations.Nullable;
import com.dua3.utility.options.Arguments;
import com.dua3.utility.options.ChoiceOption;
import com.dua3.utility.options.Flag;
import com.dua3.utility.options.Option;
import com.dua3.utility.options.SimpleOption;
import javafx.beans.property.Property;
import javafx.beans.property.ReadOnlyBooleanProperty;
import javafx.beans.property.ReadOnlyStringProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.geometry.Insets;
import javafx.scene.Node;
import javafx.scene.control.CheckBox;
import javafx.scene.control.Label;
import javafx.scene.layout.GridPane;
import javafx.util.StringConverter;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import java.util.ArrayDeque;
import java.util.Collection;
import java.util.Deque;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.stream.Stream;
/**
* OptionsPane is a custom JavaFX GridPane used as a control element for managing
* a collection of options represented by instances of the {@link Option} class.
* It implements the {@link InputControl} interface which allows it to handle input
* and provide output in the form of {@link Arguments}.
*/
public class OptionsPane extends GridPane implements InputControl {
/**
* Logger
*/
protected static final Logger LOG = LogManager.getLogger(OptionsPane.class);
private static final Insets INSETS = new Insets(2);
private final InputControl.State<@Nullable Arguments> state;
private final Supplier extends Collection
© 2015 - 2025 Weber Informatics LLC | Privacy Policy