com.vaadin.flow.theme.
Class ThemeDefinition
- java.lang.Object
-
- com.vaadin.flow.theme.ThemeDefinition
-
All Implemented Interfaces:
Direct Known Subclasses:
public class ThemeDefinition extends Object implements Serializable
Holds all the settings needed to properly set a Theme in the application.
Since:
1.0.
Author:
Vaadin Ltd
See Also:
-
-
Constructor Summary
Constructors Constructor and Description ThemeDefinition(Class<? extends AbstractTheme> theme, String variant)
Creates a definition with the given them class and variant.
ThemeDefinition(Theme themeAnnotation)
Helper constructor that extracts the needed information from a Theme annotation.
-
Method Summary
All Methods Modifier and Type Method and Description Class<? extends AbstractTheme>
getTheme()
Gets the theme class.
String
getVariant()
Gets the variant of the theme.
-
-
-
Constructor Detail
-
ThemeDefinition
public ThemeDefinition(Class<? extends AbstractTheme> theme, String variant)
Creates a definition with the given them class and variant.
Parameters:
theme
- the theme class, notnull
variant
- the variant of the theme, notnull
-
ThemeDefinition
public ThemeDefinition(Theme themeAnnotation)
Helper constructor that extracts the needed information from a Theme annotation.
Parameters:
themeAnnotation
- the annotation to get the definition from
-
-
Method Detail
-
getTheme
public Class<? extends AbstractTheme> getTheme()
Gets the theme class.
Returns:
the theme class
-
getVariant
public String getVariant()
Gets the variant of the theme.
Returns:
the variant
-
-