Class MultiSelectComboBoxI18n

java.lang.Object
com.vaadin.flow.component.combobox.MultiSelectComboBoxI18n
All Implemented Interfaces:
ComboBoxBaseI18n, Serializable

public class MultiSelectComboBoxI18n extends Object implements ComboBoxBaseI18n
Class for localization of the MultiSelectComboBox
See Also:
  • Constructor Details

    • MultiSelectComboBoxI18n

      public MultiSelectComboBoxI18n()
  • Method Details

    • getRequiredErrorMessage

      public String getRequiredErrorMessage()
      Gets the error message displayed when the field is required but empty.
      Specified by:
      getRequiredErrorMessage in interface ComboBoxBaseI18n
      Returns:
      the error message or null if not set
      See Also:
    • setRequiredErrorMessage

      public MultiSelectComboBoxI18n setRequiredErrorMessage(String errorMessage)
      Sets the error message to display when the field is required but empty.

      Note, custom error messages set with HasValidationProperties.setErrorMessage(String) take priority over i18n error messages.

      Parameters:
      errorMessage - the error message or null to clear it
      Returns:
      this instance for method chaining
      See Also:
    • getCleared

      public String getCleared()
      The text that is announced by screen readers when the clear button is clicked.

      The value is null by default, which means the default value of the web component will be used.

      Returns:
      the text that is announced by screen readers when the clear button is clicked or null if the default value of the web component is used.
    • setCleared

      public MultiSelectComboBoxI18n setCleared(String cleared)
      Sets the text that is announced by screen readers when the clear button is clicked.
      Parameters:
      cleared - the text that is announced by screen readers when the clear button is clicked or null if the default value of the web component should be used.
      Returns:
      this instance for method chaining
    • getFocused

      public String getFocused()
      The text that is announced by screen readers when a chip is focused.

      The value is null by default, which means the default value of the web component will be used.

      Returns:
      the text that is announced by screen readers when a chip is focused or null if the default value of the web component is used.
    • setFocused

      public MultiSelectComboBoxI18n setFocused(String focused)
      Sets the text that is announced by screen readers when a chip is focused. The label of the chip will be prepended to this text.
      Parameters:
      focused - the text that is announced by screen readers when a chip is focused or null if the default value of the web component should be used.
      Returns:
      this instance for method chaining
    • getSelected

      public String getSelected()
      The text that is announced by screen readers when an item is added to the selection.

      The value is null by default, which means the default value of the web component will be used.

      Returns:
      the text that is announced by screen readers when an item is added to the selection or null if the default value of the web component is used.
    • setSelected

      public MultiSelectComboBoxI18n setSelected(String selected)
      Sets the text that is announced by screen readers when an item is added to the selection. The label of the item will be prepended to this text.
      Parameters:
      selected - the text that is announced by screen readers when an item is added to the selection or null if the default value of the web component should be used.
      Returns:
      this instance for method chaining
    • getDeselected

      public String getDeselected()
      The text that is announced by screen readers when an item is removed from the selection.

      The value is null by default, which means the default value of the web component will be used.

      Returns:
      the text that is announced by screen readers when an item is removed from the selection or null if the default value of the web component is used.
    • setDeselected

      public MultiSelectComboBoxI18n setDeselected(String deselected)
      Sets the text that is announced by screen readers when an item is removed from the selection. The label of the item will be prepended to this text.
      Parameters:
      deselected - the text that is announced by screen readers when an item is removed from the selection or null if the default value of the web component should be used.
      Returns:
      this instance for method chaining
    • getTotal

      public String getTotal()
      The text that is announced by screen readers to inform about the total number of selected items.

      The value is null by default, which means the default value of the web component will be used.

      Returns:
      the text that is announced by screen readers to inform about the total number of selected items or null if the default value of the web component is used.
    • setTotal

      public MultiSelectComboBoxI18n setTotal(String total)
      Sets the text that is announced by screen readers to inform about the total number of selected items. The string must contain a `{count}` placeholder that will be replaced with the actual count of selected items by the component.
      Parameters:
      total - the text that is announced by screen readers to inform about the total number of selected items or null if the default value of the web component should be used.
      Returns:
      this instance for method chaining