- All Implemented Interfaces:
Serializable,Comparable<Badge.Variant>,Constable
- Enclosing class:
Badge
Defines the available visual styling variants for UI components such as badges and buttons.
Each variant corresponds to a specific pre-defined appearance, including color and border
styles, used to differentiate component types and states.
Supported variants:
DEFAULT- The standard appearance.OUTLINED- A visual style with an outline border.INFO- Style intended for informational components.WARNING- Style indicating warnings or caution.SUCCESS- Style representing success states.DANGER- Style indicating errors or critical states.PRIMARY- A primary style for emphasizing components.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic Badge.VariantgetWeightVariant(int weight) Returns the badge variant based on a 1-6 weight.static Badge.VariantReturns the enum constant of this class with the specified name.static Badge.Variant[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
OUTLINED
-
DEFAULT
-
INFO
-
WARNING
-
SUCCESS
-
DANGER
-
PRIMARY
-
-
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
-
getWeightVariant
Returns the badge variant based on a 1-6 weight.- Parameters:
weight- the weight of the variant, which should be between 1 and 6.- Returns:
- the badge variant corresponding to the weight.
-