com.vaadin.flow.component.textfield.
Interface HasPrefixAndSuffix
-
All Superinterfaces:
All Known Implementing Classes:
AbstractNumberField
,BigDecimalField
,EmailField
,IntegerField
,NumberField
,PasswordField
,TextArea
,TextField
public interface HasPrefixAndSuffix extends HasElement
Mixin interface for text-field components that have prefix and suffix slots for inserting components.
Author:
Vaadin Ltd
-
-
Method Summary
All Methods Modifier and Type Method Description default Component
getPrefixComponent()
Gets the component in the prefix slot of this field.
default Component
getSuffixComponent()
Gets the component in the suffix slot of this field.
default void
setPrefixComponent(Component component)
Adds the given component into this field before the content, replacing any existing prefix component.
default void
setSuffixComponent(Component component)
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 Detail
-
setPrefixComponent
default void setPrefixComponent(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 benull
to remove existing prefix component
-
getPrefixComponent
default Component getPrefixComponent()
Gets the component in the prefix slot of this field.
Returns:
the prefix component of this field, or
null
if no prefix component has been setSee Also:
-
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 benull
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 setSee Also:
-
-