Package com.vaadin.flow.component.shared
Interface HasThemeVariant<TVariantEnum extends ThemeVariant>
- Type Parameters:
TVariantEnum- The specific theme variant enum type
- All Superinterfaces:
HasElement,HasTheme,Serializable
- All Known Implementing Classes:
AccordionPanel,Avatar,AvatarGroup,BigDecimalField,Button,Card,Checkbox,CheckboxGroup,CollaborationAvatarGroup,ComboBox,Dashboard,DatePicker,DateTimePicker,Details,Dialog,DrawerToggle,EmailField,HorizontalLayout,IntegerField,Map,MapBase,MenuBar,MessageInput,MultiSelectComboBox,Notification,NumberField,PasswordField,Popover,ProgressBar,RadioButtonGroup,RichTextEditor,Scroller,Select,SideNav,SplitLayout,Tab,Tabs,TabSheet,TextArea,TextField,TimePicker,Upload,VerticalLayout,VirtualList
Mixin interface that allows adding and removing typed theme variants to /
from a component
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddThemeVariants(TVariantEnum... variants) Adds theme variants to the component.default voidremoveThemeVariants(TVariantEnum... variants) Removes theme variants from the component.default voidsetThemeVariant(TVariantEnum variant, boolean set) Adds or removes the given theme variant for this component.default voidsetThemeVariants(boolean set, TVariantEnum... variants) Adds or removes the given theme variants for this component.default voidsetThemeVariants(TVariantEnum... variants) Sets the theme variants of this component.Methods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeName
-
Method Details
-
addThemeVariants
Adds theme variants to the component.- Parameters:
variants- theme variants to add
-
removeThemeVariants
Removes theme variants from the component.- Parameters:
variants- theme variants to remove
-
setThemeVariant
Adds or removes the given theme variant for this component.- Parameters:
variant- the theme variant to add or remove, notnullset-trueto add the theme variant,falseto remove it
-
setThemeVariants
Sets the theme variants of this component. This method overwrites any previous set theme variants.- Parameters:
variants- the theme variants to set
-
setThemeVariants
Adds or removes the given theme variants for this component.- Parameters:
set-trueto add the theme variants,falseto remove themvariants- the theme variants to add or remove
-