Enum DefaultToastType
- java.lang.Object
-
- java.lang.Enum<DefaultToastType>
-
- org.pepstock.charba.client.utils.toast.enums.DefaultToastType
-
- All Implemented Interfaces:
Serializable
,Comparable<DefaultToastType>
,Key
,IsToastType
public enum DefaultToastType extends Enum<DefaultToastType> implements IsToastType
Enumerates the list of default notification type for toasting.- Author:
- Andrea "Stock" Stocchero
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DARK
Dark toast type - Toast contentDEFAULT
Default toast type - Toast contentERROR
Error toast type - Toast contentINFO
Info toast type - Toast contentSUCCESS
Success toast type - Toast contentWARNING
Warning toast type - Toast content
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Gradient
getBackgroundAsGradient()
Returns the backgroundGradient
of the toast.Pattern
getBackgroundAsPattern()
Returns the backgroundPattern
of the toast.IsColor
getBackgroundColor()
Returns the backgroundIsColor
of the toast.IsColor
getColor()
Returns the color of the text in the toast.String
value()
Returns the name value of propertystatic DefaultToastType
valueOf(String name)
Returns the enum constant of this type with the specified name.static DefaultToastType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DEFAULT
public static final DefaultToastType DEFAULT
Default toast type - Toast content
-
SUCCESS
public static final DefaultToastType SUCCESS
Success toast type - Toast content
-
WARNING
public static final DefaultToastType WARNING
Warning toast type - Toast content
-
ERROR
public static final DefaultToastType ERROR
Error toast type - Toast content
-
INFO
public static final DefaultToastType INFO
Info toast type - Toast content
-
DARK
public static final DefaultToastType DARK
Dark toast type - Toast content
-
-
Method Detail
-
values
public static DefaultToastType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DefaultToastType c : DefaultToastType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DefaultToastType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
value
public String value()
Description copied from interface:Key
Returns the name value of property
-
getColor
public IsColor getColor()
Description copied from interface:IsToastType
Returns the color of the text in the toast.- Specified by:
getColor
in interfaceIsToastType
- Returns:
- the color of the text in the toast
-
getBackgroundColor
public IsColor getBackgroundColor()
Description copied from interface:IsToastType
Returns the backgroundIsColor
of the toast.- Specified by:
getBackgroundColor
in interfaceIsToastType
- Returns:
- the background
IsColor
of the toast
-
getBackgroundAsPattern
public Pattern getBackgroundAsPattern()
Description copied from interface:IsToastType
Returns the backgroundPattern
of the toast.- Specified by:
getBackgroundAsPattern
in interfaceIsToastType
- Returns:
- the background
Pattern
of the toast
-
getBackgroundAsGradient
public Gradient getBackgroundAsGradient()
Description copied from interface:IsToastType
Returns the backgroundGradient
of the toast.- Specified by:
getBackgroundAsGradient
in interfaceIsToastType
- Returns:
- the background
Gradient
of the toast
-
-