We use cookies to serve our customers and website visitors in the best possible way. Cookies are used for the proper functioning of the website and for improving the user experience, monitoring visitor traffic and marketing purposes. By continuing to browse the site, you agree to our use of cookies. You can read more about cookies here.
com.vaadin.flow.component.
Interface HasLabel
-
All Superinterfaces:
public interface HasLabel extends HasElement
A component that supports label definition.
The default implementations set the label of the component to the given text for
HasElement.getElement()
. Override all methods in this interface if the text should be added to some other element.Since:
Author:
Vaadin Ltd
-
-
Method Summary
All Methods Modifier and Type Method and Description default String
getLabel()
Gets the label of the component.
default void
setLabel(String label)
Set the label of the component to the given text.
-
Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
-
-
-
-
Method Detail
-
setLabel
default void setLabel(String label)
Set the label of the component to the given text.
Parameters:
label
- the label text to set ornull
to clear
-
getLabel
default String getLabel()
Gets the label of the component.
Returns:
the label of the component or
null
if no label has been set
-
-