Enum Class ToggleButtonVariant
- All Implemented Interfaces:
ThemeVariant,Serializable,Comparable<ToggleButtonVariant>,Constable
Theme variants for the
ToggleButton component.
Size variants (SMALL, MEDIUM, LARGE) and LONGSWIPE can be
combined (e.g. LONGSWIPE + LARGE).
- Since:
- 1.0.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 contrast color to the checked state.Applies the error color to the checked state.Renders the toggle at a larger size (56x32 px track).Renders a wider switch track optimized for touch interaction.Renders the toggle at the default medium size (44x24 px track).Applies the primary color to the checked state.Renders the toggle at a smaller size (32x18 px track).Applies the success color to the checked state.Applies the warning color to the checked state. -
Method Summary
Modifier and TypeMethodDescriptionstatic ToggleButtonVariantReturns the enum constant of this class with the specified name.static ToggleButtonVariant[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SMALL
Renders the toggle at a smaller size (32x18 px track). -
MEDIUM
Renders the toggle at the default medium size (44x24 px track). -
LARGE
Renders the toggle at a larger size (56x32 px track). -
LONGSWIPE
Renders a wider switch track optimized for touch interaction. Can be combined with size variants: the track width is increased by 28 px while preserving the height of the chosen size. -
PRIMARY
Applies the primary color to the checked state. -
SUCCESS
Applies the success color to the checked state. -
WARNING
Applies the warning color to the checked state. -
ERROR
Applies the error color to the checked state. -
CONTRAST
Applies the contrast color to the checked state.
-
-
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
-
getVariantName
- Specified by:
getVariantNamein interfaceThemeVariant
-