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
(javafx.scene.control.TextField textField, Collection<T> possibleSuggestions) static <T> AutoCompletionBinding
<T> bindAutoCompletion
(javafx.scene.control.TextField textField, javafx.util.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
(javafx.scene.control.TextField textField, javafx.util.Callback<AutoCompletionBinding.ISuggestionRequest, Collection<T>> suggestionProvider, javafx.util.StringConverter<T> converter) Create a new auto-completion binding between the given textField and the given suggestion provider.static <T> AutoCompletionBinding
<T> bindAutoCompletion
(javafx.scene.control.TextField textField, T... possibleSuggestions) Create a new auto-completion binding between the givenTextField
using the given auto-complete suggestionsstatic javafx.scene.control.PasswordField
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.static javafx.scene.control.TextField
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.
-
Method Details
-
createClearableTextField
public static javafx.scene.control.TextField 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
public static javafx.scene.control.PasswordField 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(javafx.scene.control.TextField textField, javafx.util.Callback<AutoCompletionBinding.ISuggestionRequest, Collection<T>> suggestionProvider, javafx.util.StringConverter<T> converter) Create a new auto-completion binding between the given textField and the given suggestion provider. TheTextFields
API has some suggestion-provider builder methods for simple use cases.- Parameters:
textField
- TheTextField
to 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(javafx.scene.control.TextField textField, javafx.util.Callback<AutoCompletionBinding.ISuggestionRequest, Collection<T>> suggestionProvider) Create a new auto-completion binding between the given textField and the given suggestion provider. TheTextFields
API has some suggestion-provider builder methods for simple use cases.- Parameters:
textField
- TheTextField
to which auto-completion shall be addedsuggestionProvider
- A suggestion-provider strategy to use- Returns:
- The AutoCompletionBinding
-
bindAutoCompletion
public static <T> AutoCompletionBinding<T> bindAutoCompletion(javafx.scene.control.TextField textField, T... possibleSuggestions) Create a new auto-completion binding between the givenTextField
using the given auto-complete suggestions- Parameters:
textField
- TheTextField
to which auto-completion shall be addedpossibleSuggestions
- Possible auto-complete suggestions- Returns:
- The AutoCompletionBinding
-
bindAutoCompletion
public static <T> AutoCompletionBinding<T> bindAutoCompletion(javafx.scene.control.TextField textField, Collection<T> possibleSuggestions)
-