Interface HasTheme

    • Method Detail

      • addThemeName

        default void addThemeName​(String themeName)
        Adds a theme name to this component.
        Parameters:
        themeName - the theme name to add, not null
      • removeThemeName

        default boolean removeThemeName​(String themeName)
        Removes a theme name from this component.
        Parameters:
        themeName - the theme name to remove, not null
        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:
        Element.getThemeList()
      • 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, not null
        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 for
        Returns:
        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