Enum Class FabVariant
- All Implemented Interfaces:
Serializable,Comparable<FabVariant>,Constable
Theme variants supported by the chat assistant floating action button (FAB).
Variants fall into two groups: the size variants SMALL and LARGE
resize the FAB to a predefined diameter and are mutually exclusive (only one is active at a time),
while the color variants are applied to the FAB and accumulate. All variants work under
both the Lumo and Aura themes, except LUMO_CONTRAST, which is only effective under Lumo.
- Since:
- 5.1.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionApplies the error (red) color to the FAB.Renders the FAB at the large predefined diameter.Applies the contrast color to the FAB.Applies the primary color to the FAB.Renders the FAB at the small predefined diameter.Applies the success (green) color to the FAB. -
Method Summary
Modifier and TypeMethodDescriptionReturns the Aura accent CSS class for this variant, ornullif it renders from its Lumo token alone.Returns the Vaadin button variant that carries this variant's color.booleanstatic FabVariantReturns the enum constant of this class with the specified name.static FabVariant[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SMALL
Renders the FAB at the small predefined diameter. -
LARGE
Renders the FAB at the large predefined diameter. -
PRIMARY
Applies the primary color to the FAB. -
SUCCESS
Applies the success (green) color to the FAB. -
ERROR
Applies the error (red) color to the FAB. -
LUMO_CONTRAST
Applies the contrast color to the FAB. Effective only under the Lumo theme.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
isSizeVariant
public boolean isSizeVariant()- Returns:
trueif this is a size variant
-
getButtonVariant
Returns the Vaadin button variant that carries this variant's color.- Returns:
- the underlying
ButtonVariant
-
getAuraClass
Returns the Aura accent CSS class for this variant, ornullif it renders from its Lumo token alone. Aura styles its accent colors via a CSS class rather than the theme attribute.- Returns:
- the Aura accent class, or
null
-