Class TextFieldBuilder

java.lang.Object
com.dua3.utility.fx.controls.TextFieldBuilder

public final class TextFieldBuilder extends Object
A builder class for constructing customized TextFields.

This class supports building TextFields with specific configurations such as setting text, type, and binding the disabled state.

  • Method Details

    • text

      public TextFieldBuilder text(String text)
      Sets the text for the TextField being constructed.
      Parameters:
      text - the text to set in the TextField
      Returns:
      this builder instance
    • type

      public TextFieldBuilder type(TextFieldType type)
      Sets the type of the TextField.

      This method allows you to specify the type of input the TextField should accept. The supported types are defined in the TextFieldType enum.

      Parameters:
      type - the type to set for the TextField
      Returns:
      this instance for method chaining
    • bindDisabled

      public TextFieldBuilder bindDisabled(javafx.beans.value.ObservableBooleanValue disabled)
      Bind the control's disabled state to an ObservableValue.
      Parameters:
      disabled - the value to bind the control's disableProperty to
      Returns:
      this instance
    • build

      public javafx.scene.control.TextField build()
      Constructs and returns a customized TextField based on the configurations set in the builder.
      Returns:
      the configured TextField instance