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

public interface HasThemeVariant<TVariantEnum extends ThemeVariant> extends HasTheme
Mixin interface that allows adding and removing typed theme variants to / from a component
  • Method Details

    • addThemeVariants

      default void addThemeVariants(TVariantEnum... variants)
      Adds theme variants to the component.
      Parameters:
      variants - theme variants to add
    • removeThemeVariants

      default void removeThemeVariants(TVariantEnum... variants)
      Removes theme variants from the component.
      Parameters:
      variants - theme variants to remove
    • setThemeVariant

      default void setThemeVariant(TVariantEnum variant, boolean set)
      Adds or removes the given theme variant for this component.
      Parameters:
      variant - the theme variant to add or remove, not null
      set - true to add the theme variant, false to remove it
    • setThemeVariants

      default void setThemeVariants(TVariantEnum... variants)
      Sets the theme variants of this component. This method overwrites any previous set theme variants.
      Parameters:
      variants - the theme variants to set
    • setThemeVariants

      default void setThemeVariants(boolean set, TVariantEnum... variants)
      Adds or removes the given theme variants for this component.
      Parameters:
      set - true to add the theme variants, false to remove them
      variants - the theme variants to add or remove