Package com.dua3.utility.fx.controls
Class TextFieldBuilder
java.lang.Object
com.dua3.utility.fx.controls.TextFieldBuilder
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 Summary
Modifier and TypeMethodDescriptionbindDisabled
(javafx.beans.value.ObservableBooleanValue disabled) Bind the control's disabled state to anObservableValue
.javafx.scene.control.TextField
build()
Constructs and returns a customized TextField based on the configurations set in the builder.Sets the text for the TextField being constructed.type
(TextFieldType type) Sets the type of the TextField.
-
Method Details
-
text
Sets the text for the TextField being constructed.- Parameters:
text
- the text to set in the TextField- Returns:
- this builder instance
-
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
Bind the control's disabled state to anObservableValue
.- 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
-