java.lang.Object
org.controlsfx.control.textfield.TextFields
A class containing useful customizations for the JavaFX
TextField.
Note that this class is experimental and the API may change in future
releases. Note also that this class makes use of the CustomTextField
class.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> AutoCompletionBinding<T>bindAutoCompletion(TextField textField, Collection<T> possibleSuggestions) static <T> AutoCompletionBinding<T>bindAutoCompletion(TextField textField, Callback<AutoCompletionBinding.ISuggestionRequest, Collection<T>> suggestionProvider) Create a new auto-completion binding between the given textField and the given suggestion provider.static <T> AutoCompletionBinding<T>bindAutoCompletion(TextField textField, Callback<AutoCompletionBinding.ISuggestionRequest, Collection<T>> suggestionProvider, StringConverter<T> converter) Create a new auto-completion binding between the given textField and the given suggestion provider.static <T> AutoCompletionBinding<T>bindAutoCompletion(TextField textField, T... possibleSuggestions) Create a new auto-completion binding between the givenTextFieldusing the given auto-complete suggestionsstatic PasswordFieldCreates a PasswordField that shows a clear button inside the PasswordField (on the right hand side of it) when text is entered by the user.static TextFieldCreates a TextField that shows a clear button inside the TextField (on the right hand side of it) when text is entered by the user.
-
Method Details
-
createClearableTextField
Creates a TextField that shows a clear button inside the TextField (on the right hand side of it) when text is entered by the user. -
createClearablePasswordField
Creates a PasswordField that shows a clear button inside the PasswordField (on the right hand side of it) when text is entered by the user. -
bindAutoCompletion
public static <T> AutoCompletionBinding<T> bindAutoCompletion(TextField textField, Callback<AutoCompletionBinding.ISuggestionRequest, Collection<T>> suggestionProvider, StringConverter<T> converter) Create a new auto-completion binding between the given textField and the given suggestion provider. TheTextFieldsAPI has some suggestion-provider builder methods for simple use cases.- Parameters:
textField- TheTextFieldto which auto-completion shall be addedsuggestionProvider- A suggestion-provider strategy to useconverter- The converter to be used to convert suggestions to strings
-
bindAutoCompletion
public static <T> AutoCompletionBinding<T> bindAutoCompletion(TextField textField, Callback<AutoCompletionBinding.ISuggestionRequest, Collection<T>> suggestionProvider) Create a new auto-completion binding between the given textField and the given suggestion provider. TheTextFieldsAPI has some suggestion-provider builder methods for simple use cases.- Parameters:
textField- TheTextFieldto which auto-completion shall be addedsuggestionProvider- A suggestion-provider strategy to use- Returns:
- The AutoCompletionBinding
-
bindAutoCompletion
public static <T> AutoCompletionBinding<T> bindAutoCompletion(TextField textField, T... possibleSuggestions) Create a new auto-completion binding between the givenTextFieldusing the given auto-complete suggestions- Parameters:
textField- TheTextFieldto which auto-completion shall be addedpossibleSuggestions- Possible auto-complete suggestions- Returns:
- The AutoCompletionBinding
-
bindAutoCompletion
public static <T> AutoCompletionBinding<T> bindAutoCompletion(TextField textField, Collection<T> possibleSuggestions)
-