Interface HasPrefixAndSuffix
-
- All Superinterfaces:
com.vaadin.flow.component.HasElement,Serializable
- All Known Implementing Classes:
AbstractNumberField,BigDecimalField,EmailField,IntegerField,NumberField,PasswordField,TextArea,TextField
public interface HasPrefixAndSuffix extends com.vaadin.flow.component.HasElementMixin interface for text-field components that have prefix and suffix slots for inserting components.- Author:
- Vaadin Ltd
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default com.vaadin.flow.component.ComponentgetPrefixComponent()Gets the component in the prefix slot of this field.default com.vaadin.flow.component.ComponentgetSuffixComponent()Gets the component in the suffix slot of this field.default voidsetPrefixComponent(com.vaadin.flow.component.Component component)Adds the given component into this field before the content, replacing any existing prefix component.default voidsetSuffixComponent(com.vaadin.flow.component.Component component)Adds the given component into this field after the content, replacing any existing suffix component.
-
-
-
Method Detail
-
setPrefixComponent
default void setPrefixComponent(com.vaadin.flow.component.Component component)
Adds the given component into this field before the content, replacing any existing prefix component.This is most commonly used to add a simple icon or static text into the field.
- Parameters:
component- the component to set, can benullto remove existing prefix component
-
getPrefixComponent
default com.vaadin.flow.component.Component getPrefixComponent()
Gets the component in the prefix slot of this field.- Returns:
- the prefix component of this field, or
nullif no prefix component has been set - See Also:
setPrefixComponent(Component)
-
setSuffixComponent
default void setSuffixComponent(com.vaadin.flow.component.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 benullto remove existing suffix component
-
getSuffixComponent
default com.vaadin.flow.component.Component getSuffixComponent()
Gets the component in the suffix slot of this field.- Returns:
- the suffix component of this field, or
nullif no suffix component has been set - See Also:
setPrefixComponent(Component)
-
-