Interface HasSuffix

All Superinterfaces:
HasElement, Serializable
All Known Subinterfaces:
HasPrefixAndSuffix
All Known Implementing Classes:
AbstractNumberField, BigDecimalField, Button, DrawerToggle, EmailField, IntegerField, NumberField, PasswordField, SideNavItem, TabSheet, TextArea, TextField, TextFieldBase

public interface HasSuffix extends HasElement
Mixin interface for components that have a suffix slot.
Author:
Vaadin Ltd
  • Method Summary

    Modifier and Type
    Method
    Description
    default Component
    Gets the component in the suffix slot of this field.
    default void
    Adds the given component into this field after the content, replacing any existing suffix component.

    Methods inherited from interface com.vaadin.flow.component.HasElement

    getElement
  • Method Details

    • setSuffixComponent

      default void setSuffixComponent(Component component)
      Adds the given component into this field after the content, replacing any existing suffix component.

      This is most commonly used to add a simple icon or static text into the field.

      Parameters:
      component - the component to set, can be null to remove existing suffix component
    • getSuffixComponent

      default Component getSuffixComponent()
      Gets the component in the suffix slot of this field.
      Returns:
      the suffix component of this field, or null if no suffix component has been set
      See Also:
      • #setPrefixComponent(Component)