com.holonplatform.vaadin7.components.builders

## Interface TextInputBuilder<T,C extends Input<T>,B extends TextInputBuilder<T,C,B>>

- Type Parameters:
    `T` - Value type
    `B` - Concrete builder type
  All Superinterfaces:
    ComponentConfigurator<B>, InputBuilder<T,C,B>, InputConfigurator<T,B>
  All Known Subinterfaces:
    NumberInputBuilder<T>, StringInputBuilder

      public interface TextInputBuilder<T,C extends Input<T>,B extends TextInputBuilder<T,C,B>>
      extends InputBuilder<T,C,B>

  Base builder to create `Input` instances backed by a text input widget.
  Since:
    5.0.0

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.holonplatform.vaadin7.components.builders.InputConfigurator

      `InputConfigurator.BaseFieldConfigurator<T>`

    - ### Nested classes/interfaces inherited from interface com.holonplatform.vaadin7.components.builders.ComponentConfigurator

      `ComponentConfigurator.BaseComponentConfigurator`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `B` | `inputPrompt(com.holonplatform.core.i18n.Localizable inputPrompt)` Sets the input prompt - a textual prompt that is displayed when the field would otherwise be empty, to prompt the user for input - using a `Localizable` message.
    `B` | `inputPrompt(String inputPrompt)` Sets the input prompt - a textual prompt that is displayed when the field would otherwise be empty, to prompt the user for input.
    `B` | `inputPrompt(String defaultInputPrompt, String messageCode, Object... arguments)` Sets the input prompt - a textual prompt that is displayed when the field would otherwise be empty, to prompt the user for input - using a localizable `messageCode`.
    `B` | `maxLength(int maxLength)` Set the maximum number of characters in the field
    `B` | `textChangeEventMode(com.vaadin.ui.AbstractTextField.TextChangeEventMode inputEventMode)` Sets the mode how the TextField triggers `FieldEvents.TextChangeEvent`s.
    `B` | `textChangeTimeout(int timeout)` The text change timeout modifies how often text change events are communicated to the application when text change event mode is `AbstractTextField.TextChangeEventMode.LAZY` or `AbstractTextField.TextChangeEventMode.TIMEOUT`.
    `B` | `withBlurListener(com.vaadin.event.FieldEvents.BlurListener listener)` Add a listener for focus lost events
    `B` | `withFocusListener(com.vaadin.event.FieldEvents.FocusListener listener)` Add a listener for focus gained events
    `B` | `withTextChangeListener(com.vaadin.event.FieldEvents.TextChangeListener listener)` Add a listener for text change events

    - ### Methods inherited from interface com.holonplatform.vaadin7.components.builders.InputBuilder

      `asField, build, deferLocalization, validatable`

    - ### Methods inherited from interface com.holonplatform.vaadin7.components.builders.InputConfigurator

      `locale, readOnly, tabIndex, withValue, withValueChangeListener`

    - ### Methods inherited from interface com.holonplatform.vaadin7.components.builders.ComponentConfigurator

      `caption, caption, caption, captionAsHtml, description, description, description, disabled, errorHandler, fullHeight, fullSize, fullWidth, height, height, heightUndefined, hidden, icon, id, immediate, notVisible, primaryStyleName, replaceStyleName, responsive, sizeUndefined, styleName, width, width, widthUndefined, withAttachListener, withContextClickListener, withData, withDetachListener, withShortcutListener`

- - ### Method Detail

    - #### maxLength

          B maxLength(int maxLength)

      Set the maximum number of characters in the field
      Parameters:
        `maxLength` - Maximum number of characters in the field, -1 is considered unlimited
      Returns:
        this

    - #### inputPrompt

          B inputPrompt(String inputPrompt)

      Sets the input prompt - a textual prompt that is displayed when the field would otherwise be empty, to prompt the user for input.
      Parameters:
        `inputPrompt` - the input prompt to set, `null` for none
      Returns:
        this

    - #### inputPrompt

          B inputPrompt(String defaultInputPrompt,
                        String messageCode,
                        Object... arguments)

      Sets the input prompt - a textual prompt that is displayed when the field would otherwise be empty, to prompt the user for input - using a localizable `messageCode`.

      For input prompt localization, a `LocalizationContext` must be available and localized as `Context` resource when component is built or when component is displayed if `InputBuilder.deferLocalization()` is `true`.

      Parameters:
        `defaultInputPrompt` - Default message if no translation is available for given `messageCode` for current Locale.
        `messageCode` - Input prompt translation message key
        `arguments` - Optional translation arguments
      Returns:
        this

    - #### inputPrompt

          B inputPrompt(com.holonplatform.core.i18n.Localizable inputPrompt)

      Sets the input prompt - a textual prompt that is displayed when the field would otherwise be empty, to prompt the user for input - using a `Localizable` message.

      For input prompt localization, a `LocalizationContext` must be available and localized as `Context` resource when component is built or when component is displayed if `InputBuilder.deferLocalization()` is `true`.

      Parameters:
        `inputPrompt` - Localizable input prompt
      Returns:
        this

    - #### textChangeEventMode

          B textChangeEventMode(com.vaadin.ui.AbstractTextField.TextChangeEventMode inputEventMode)

      Sets the mode how the TextField triggers `FieldEvents.TextChangeEvent`s.
      Parameters:
        `inputEventMode` - the new mode
      Returns:
        this
      See Also:
        `AbstractTextField.TextChangeEventMode`

    - #### textChangeTimeout

          B textChangeTimeout(int timeout)

      The text change timeout modifies how often text change events are communicated to the application when text change event mode is `AbstractTextField.TextChangeEventMode.LAZY` or `AbstractTextField.TextChangeEventMode.TIMEOUT`.
      Parameters:
        `timeout` - the timeout in milliseconds
      Returns:
        this

    - #### withTextChangeListener

          B withTextChangeListener(com.vaadin.event.FieldEvents.TextChangeListener listener)

      Add a listener for text change events
      Parameters:
        `listener` - Listener to add
      Returns:
        this

    - #### withFocusListener

          B withFocusListener(com.vaadin.event.FieldEvents.FocusListener listener)

      Add a listener for focus gained events
      Parameters:
        `listener` - Listener to add
      Returns:
        this

    - #### withBlurListener

          B withBlurListener(com.vaadin.event.FieldEvents.BlurListener listener)

      Add a listener for focus lost events
      Parameters:
        `listener` - Listener to add
      Returns:
        this

Copyright © 2019 The Holon Platform. All rights reserved.