Interface TextComponentBuilder<T,C extends JTextComponent,B extends TextComponentBuilder<T,C,B>>

All Superinterfaces:
ComponentBuilder<T,C,B>
All Known Subinterfaces:
NumberField.Builder<T>, PasswordFieldBuilder, TemporalField.Builder<T>, TextAreaBuilder, TextFieldBuilder<T,C,B>

public interface TextComponentBuilder<T,C extends JTextComponent,B extends TextComponentBuilder<T,C,B>> extends ComponentBuilder<T,C,B>
A builder for text components.
  • Method Details

    • editable

      B editable(boolean editable)
      Parameters:
      editable - false if the component should not be editable
      Returns:
      this builder instance
      See Also:
    • updateOn

      B updateOn(UpdateOn updateOn)
      Parameters:
      updateOn - specifies when the underlying value should be updated
      Returns:
      this builder instance
    • upperCase

      B upperCase(boolean upperCase)
      Parameters:
      upperCase - if true the text component convert all lower case input to upper case
      Returns:
      this builder instance
    • lowerCase

      B lowerCase(boolean lowerCase)
      Parameters:
      lowerCase - if true the text component convert all upper case input to lower case
      Returns:
      this builder instance
    • maximumLength

      B maximumLength(int maximumLength)
      Parameters:
      maximumLength - the maximum text length
      Returns:
      this builder instance
    • margin

      B margin(Insets margin)
      Parameters:
      margin - the margin
      Returns:
      this builder instance
      See Also:
    • controlDeleteWord

      B controlDeleteWord(boolean controlDeleteWord)
      Parameters:
      controlDeleteWord - true if CTRL-DEL and CTRL-BACKSPACE should delete the next/previous word
      Returns:
      this builder instance
    • disabledTextColor

      B disabledTextColor(Color disabledTextColor)
      Parameters:
      disabledTextColor - the color used to render disabled text
      Returns:
      this builder instance
      See Also:
    • selectedTextColor

      B selectedTextColor(Color selectedTextColor)
      Parameters:
      selectedTextColor - the color used to render selected text
      Returns:
      this builder instance
      See Also:
    • selectionColor

      B selectionColor(Color selectionColor)
      Parameters:
      selectionColor - the color used to render selected text background
      Returns:
      this builder instance
      See Also:
    • selectAllOnFocusGained

      B selectAllOnFocusGained(boolean selectAllOnFocusGained)
      Makes the text component select all when it gains focus
      Parameters:
      selectAllOnFocusGained - if true the component will select contents on focus gained
      Returns:
      this builder instance
    • moveCaretToEndOnFocusGained

      B moveCaretToEndOnFocusGained(boolean moveCaretToEndOnFocusGained)
      Parameters:
      moveCaretToEndOnFocusGained - true if the caret should be moved to the end on focus gained
      Returns:
      this builder instance
    • moveCaretToStartOnFocusGained

      B moveCaretToStartOnFocusGained(boolean moveCaretToStartOnFocusGained)
      Parameters:
      moveCaretToStartOnFocusGained - true if the caret should be moved to the start on focus gained
      Returns:
      this builder instance
    • caretListener

      B caretListener(CaretListener caretListener)
      Parameters:
      caretListener - the caret listener to add
      Returns:
      this builder instance
    • onTextChanged

      B onTextChanged(Consumer<String> onTextChanged)
      Parameters:
      onTextChanged - called when the text changes
      Returns:
      this builder instance
    • dragEnabled

      B dragEnabled(boolean dragEnabled)
      Parameters:
      dragEnabled - true if automatic drag handling should be enabled
      Returns:
      this builder instance
      See Also:
    • focusAccelerator

      B focusAccelerator(char focusAcceleratorKey)
      Parameters:
      focusAcceleratorKey - the focus accelerator key
      Returns:
      this builder instance
      See Also: