Class TextFields

java.lang.Object
org.controlsfx.control.textfield.TextFields

public class TextFields extends Object
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 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. The TextFields API has some suggestion-provider builder methods for simple use cases.
      Parameters:
      textField - The TextField to which auto-completion shall be added
      suggestionProvider - A suggestion-provider strategy to use
      converter - 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. The TextFields API has some suggestion-provider builder methods for simple use cases.
      Parameters:
      textField - The TextField to which auto-completion shall be added
      suggestionProvider - 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 given TextField using the given auto-complete suggestions
      Parameters:
      textField - The TextField to which auto-completion shall be added
      possibleSuggestions - Possible auto-complete suggestions
      Returns:
      The AutoCompletionBinding
    • bindAutoCompletion

      public static <T> AutoCompletionBinding<T> bindAutoCompletion(javafx.scene.control.TextField textField, Collection<T> possibleSuggestions)