Class ChoiceInputControl<T>

java.lang.Object
com.dua3.utility.fx.controls.ChoiceInputControl<T>
Type Parameters:
T - the input result type
All Implemented Interfaces:
InputControl<T>

public class ChoiceInputControl<T> extends Object implements InputControl<T>
Interface for an input field.
  • Property Details

  • Constructor Details

    • ChoiceInputControl

      public ChoiceInputControl(com.dua3.utility.options.ChoiceOption<T> option, Supplier<? extends T> dfltValue)
      Constructs a ChoiceInputControl with the given options and default value supplier.
      Parameters:
      option - the ChoiceOption containing possible values for the input control
      dfltValue - a Supplier that provides the default value for the input control
  • Method Details

    • node

      public Node node()
      Description copied from interface: InputControl
      Get the Node for this input element.
      Specified by:
      node in interface InputControl<T>
      Returns:
      the node
    • valueProperty

      public Property<T> valueProperty()
      Description copied from interface: InputControl
      Provides the property representing the value of this input control.
      Specified by:
      valueProperty in interface InputControl<T>
      Returns:
      the property containing the current value
    • reset

      public void reset()
      Description copied from interface: InputControl
      Reset value to default
      Specified by:
      reset in interface InputControl<T>
    • validProperty

      public ReadOnlyBooleanProperty validProperty()
      Description copied from interface: InputControl
      Provides a read-only property representing the validity of the input.
      Specified by:
      validProperty in interface InputControl<T>
      Returns:
      a ReadOnlyBooleanProperty that is true if the input is valid and false otherwise
    • errorProperty

      public ReadOnlyStringProperty errorProperty()
      Description copied from interface: InputControl
      Provides a read-only property representing the error message for this input control.

      This property contains an error message if the input is invalid, otherwise it is empty.

      Specified by:
      errorProperty in interface InputControl<T>
      Returns:
      a ReadOnlyStringProperty containing the error message if there is a validation error, otherwise empty