com.vaadin.flow.component.
Interface HasTheme
-
All Superinterfaces:
All Known Implementing Classes:
AbstractNumberField, AccordionPanel, BigDecimalField, Button, CheckboxGroup, Crud, CrudGrid, DateTimePicker, Details, DrawerToggle, EmailField, GeneratedVaadinButton, GeneratedVaadinCheckboxGroup, GeneratedVaadinEmailField, GeneratedVaadinNumberField, GeneratedVaadinPasswordField, GeneratedVaadinProgressBar, GeneratedVaadinRadioGroup, GeneratedVaadinRichTextEditor, GeneratedVaadinSplitLayout, GeneratedVaadinTab, GeneratedVaadinTabs, GeneratedVaadinTextArea, GeneratedVaadinTextField, Grid, GridPro, IntegerField, MenuBar, Notification, NumberField, PasswordField, ProgressBar, RadioButtonGroup, RichTextEditor, SplitLayout, Tab, Tabs, TextArea, TextField, TreeGrid
public interface HasTheme extends HasElement
Represents
Component
which has theme attribute.Since:
1.0
Author:
Vaadin Ltd
-
-
Method Summary
All Methods Modifier and Type Method and Description default void
addThemeName(String themeName)
Adds a theme name to this component.
default void
addThemeNames(String... themeNames)
Adds one or more theme names to this component.
default String
getThemeName()
Gets the theme names for this component.
default ThemeList
getThemeNames()
Gets the set of theme names used for this element.
default boolean
hasThemeName(String themeName)
Checks if the component has the given theme name.
default boolean
removeThemeName(String themeName)
Removes a theme name from this component.
default void
removeThemeNames(String... themeNames)
Removes one or more theme names from component.
default void
setThemeName(String themeName)
Sets the theme names of this component.
default void
setThemeName(String themeName, boolean set)
Sets or removes the given theme name for this component.
-
Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
-
-
-
-
Method Detail
-
addThemeName
default void addThemeName(String themeName)
Adds a theme name to this component.
Parameters:
themeName
- the theme name to add, notnull
-
removeThemeName
default boolean removeThemeName(String themeName)
Removes a theme name from this component.
Parameters:
themeName
- the theme name to remove, notnull
Returns:
true
if the theme name was removed,false
if the theme list didn't contain the theme name
-
setThemeName
default void setThemeName(String themeName)
Sets the theme names of this component. This method overwrites any previous set theme names.
Parameters:
themeName
- a space-separated string of theme names to set, or empty string to remove all theme names
-
getThemeName
default String getThemeName()
Gets the theme names for this component.
Returns:
a space-separated string of theme names, empty string if there are no theme names or
null
if attribute (theme) is not set at all
-
getThemeNames
default ThemeList getThemeNames()
Gets the set of theme names used for this element. The returned set can be modified to add or remove theme names. The contents of the set is also reflected in the value of the
theme
attribute.Returns:
a list of theme names, never
null
See Also:
-
setThemeName
default void setThemeName(String themeName, boolean set)
Sets or removes the given theme name for this component.
Parameters:
themeName
- the theme name to set or remove, notnull
set
-true
to set the theme name,false
to remove it
-
hasThemeName
default boolean hasThemeName(String themeName)
Checks if the component has the given theme name.
Parameters:
themeName
- the theme name to check forReturns:
true
if the component has the given theme name,false
otherwise
-
addThemeNames
default void addThemeNames(String... themeNames)
Adds one or more theme names to this component. Multiple theme names can be specified by using multiple parameters.
Parameters:
themeNames
- the theme name or theme names to be added to the component
-
removeThemeNames
default void removeThemeNames(String... themeNames)
Removes one or more theme names from component. Multiple theme names can be specified by using multiple parameters.
Parameters:
themeNames
- the theme name or theme names to be removed from the component
-
-