- java.lang.Object
-
- org.controlsfx.control.textfield.TextFields
-
public class TextFields extends Object
A class containing useful customizations for the JavaFXTextField
. Note that this class is experimental and the API may change in future releases. Note also that this class makes use of theCustomTextField
class.- See Also:
CustomTextField
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <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 givenTextField
using the given auto-complete suggestionsstatic 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.static 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.
-
-
-
Method Detail
-
createClearableTextField
public static 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 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(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. 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(TextField textField, 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(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(TextField textField, Collection<T> possibleSuggestions)
-
-