Enum GwtMaterialScheme
- java.lang.Object
-
- java.lang.Enum<GwtMaterialScheme>
-
- org.pepstock.charba.client.impl.plugins.enums.GwtMaterialScheme
-
- All Implemented Interfaces:
Serializable
,Comparable<GwtMaterialScheme>
,Key
,ColorScheme
public enum GwtMaterialScheme extends Enum<GwtMaterialScheme>
Contains all scheme definitions to map the GWT material schemes.
To configureColorSchemes.ID
plugin, where category is "gwtmaterial".
Every color scheme has a number at the end of its name, which indicates the number of that colors included in the scheme. If the number of the datasets is larger than it, the same colors will appear repeatedly. A color is not modified if it is specified by dataset options.- Author:
- Andrea "Stock" Stocchero
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AMBER
Color scheme name "AMBER" -BLUE
Color scheme name "BLUE" -BROWN
Color scheme name "BROWN" -CYAN
Color scheme name "CYAN" -GREEN
Color scheme name "GREEN" -GREY
Color scheme name "GREY" -INDIGO
Color scheme name "INDIGO" -LIME
Color scheme name "LIME" -ORANGE
Color scheme name "ORANGE" -PINK
Color scheme name "PINK" -PURPLE
Color scheme name "PURPLE" -RED
Color scheme name "RED" -TEAL
Color scheme name "TEAL" -YELLOW
Color scheme name "YELLOW" -
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Default Methods Modifier and Type Method Description default String
category()
Returns the color scheme category.default Gradient
createGradient()
Creates a LINEAR gradient, withtopDown
orientation andchart
scope.default Gradient
createGradient(GradientType type)
Creates a gradient by a type, withchart
scope.default Gradient
createGradient(GradientType type, GradientOrientation orientation)
Creates a gradient by a type and an orientation, withchart
scope.default Gradient
createGradient(GradientType type, GradientOrientation orientation, GradientScope scope)
Creates a gradient by a type, an orientation and a scope.default Gradient
createGradient(GradientType type, GradientScope scope)
Creates a gradient by a type and a scope.default List<IsColor>
getColors()
Returns a list of colors which are composing a color scheme.ColorScheme
getScheme()
default String
value()
Returns the name value of propertystatic GwtMaterialScheme
valueOf(String name)
Returns the enum constant of this type with the specified name.static GwtMaterialScheme[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BLUE
public static final GwtMaterialScheme BLUE
Color scheme name "BLUE" -
-
PURPLE
public static final GwtMaterialScheme PURPLE
Color scheme name "PURPLE" -
-
GREEN
public static final GwtMaterialScheme GREEN
Color scheme name "GREEN" -
-
INDIGO
public static final GwtMaterialScheme INDIGO
Color scheme name "INDIGO" -
-
RED
public static final GwtMaterialScheme RED
Color scheme name "RED" -
-
PINK
public static final GwtMaterialScheme PINK
Color scheme name "PINK" -
-
AMBER
public static final GwtMaterialScheme AMBER
Color scheme name "AMBER" -
-
LIME
public static final GwtMaterialScheme LIME
Color scheme name "LIME" -
-
TEAL
public static final GwtMaterialScheme TEAL
Color scheme name "TEAL" -
-
YELLOW
public static final GwtMaterialScheme YELLOW
Color scheme name "YELLOW" -
-
CYAN
public static final GwtMaterialScheme CYAN
Color scheme name "CYAN" -
-
BROWN
public static final GwtMaterialScheme BROWN
Color scheme name "BROWN" -
-
GREY
public static final GwtMaterialScheme GREY
Color scheme name "GREY" -
-
ORANGE
public static final GwtMaterialScheme ORANGE
Color scheme name "ORANGE" -
-
-
Method Detail
-
values
public static GwtMaterialScheme[] 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 (GwtMaterialScheme c : GwtMaterialScheme.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GwtMaterialScheme 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
-
getScheme
public ColorScheme getScheme()
-
value
public default String value()
Description copied from interface:Key
Returns the name value of property
-
category
public default String category()
Description copied from interface:ColorScheme
Returns the color scheme category. If not implemented, the default isColorSchemesOptions.DEFAULT_SCHEME_CATEGORY
.- Specified by:
category
in interfaceColorScheme
- Returns:
- the color scheme category. If not implemented, the default is
ColorSchemesOptions.DEFAULT_SCHEME_CATEGORY
-
getColors
public default List<IsColor> getColors()
Description copied from interface:ColorScheme
Returns a list of colors which are composing a color scheme.- Specified by:
getColors
in interfaceColorScheme
- Returns:
- a list of colors which are composing a color scheme
-
createGradient
public default Gradient createGradient()
Creates a LINEAR gradient, withtopDown
orientation andchart
scope.- Returns:
- new gradient based on color scheme
-
createGradient
public default Gradient createGradient(GradientType type)
Creates a gradient by a type, withchart
scope.- Parameters:
type
- gradient type- Returns:
- new gradient based on color scheme
-
createGradient
public default Gradient createGradient(GradientType type, GradientOrientation orientation)
Creates a gradient by a type and an orientation, withchart
scope.- Parameters:
type
- gradient typeorientation
- orientation of gradient- Returns:
- new gradient based on color scheme
-
createGradient
public default Gradient createGradient(GradientType type, GradientScope scope)
Creates a gradient by a type and a scope.- Parameters:
type
- gradient typescope
- scope of gradient- Returns:
- new gradient based on color scheme
-
createGradient
public default Gradient createGradient(GradientType type, GradientOrientation orientation, GradientScope scope)
Creates a gradient by a type, an orientation and a scope.- Parameters:
type
- gradient typeorientation
- orientation of gradientscope
- scope of gradient- Returns:
- new gradient based on color scheme
-
-