Enum GoogleChartScheme
- java.lang.Object
-
- java.lang.Enum<GoogleChartScheme>
-
- org.pepstock.charba.client.impl.plugins.enums.GoogleChartScheme
-
- All Implemented Interfaces:
Serializable,Comparable<GoogleChartScheme>,Key,ColorScheme
public enum GoogleChartScheme extends Enum<GoogleChartScheme>
Contains all scheme definitions to map the Google chart schemes.
To configureColorSchemes.IDplugin, where category is "googlechart".
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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Default Methods Modifier and Type Method Description default Stringcategory()Returns the color scheme category.default GradientcreateGradient()Creates a LINEAR gradient, withtopDownorientation andchartscope.default GradientcreateGradient(GradientType type)Creates a gradient by a type, withchartscope.default GradientcreateGradient(GradientType type, GradientOrientation orientation)Creates a gradient by a type and an orientation, withchartscope.default GradientcreateGradient(GradientType type, GradientOrientation orientation, GradientScope scope)Creates a gradient by a type, an orientation and a scope.default GradientcreateGradient(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.ColorSchemegetScheme()default Stringvalue()Returns the name value of propertystatic GoogleChartSchemevalueOf(String name)Returns the enum constant of this type with the specified name.static GoogleChartScheme[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
EIGHT
public static final GoogleChartScheme EIGHT
Color scheme name "EIGHT" -
-
TWELVE
public static final GoogleChartScheme TWELVE
Color scheme name "TWELVE" -
-
SIXTEEN
public static final GoogleChartScheme SIXTEEN
Color scheme name "SIXTEEN" -
-
TWENTY
public static final GoogleChartScheme TWENTY
Color scheme name "TWENTY" -
-
TWENTY_FOUR
public static final GoogleChartScheme TWENTY_FOUR
Color scheme name "TWENTY_FOUR" -
-
ALL
public static final GoogleChartScheme ALL
Color scheme name "ALL" -
-
-
Method Detail
-
values
public static GoogleChartScheme[] 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 (GoogleChartScheme c : GoogleChartScheme.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GoogleChartScheme 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:KeyReturns the name value of property
-
category
public default String category()
Description copied from interface:ColorSchemeReturns the color scheme category. If not implemented, the default isColorSchemesOptions.DEFAULT_SCHEME_CATEGORY.- Specified by:
categoryin 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:ColorSchemeReturns a list of colors which are composing a color scheme.- Specified by:
getColorsin interfaceColorScheme- Returns:
- a list of colors which are composing a color scheme
-
createGradient
public default Gradient createGradient()
Creates a LINEAR gradient, withtopDownorientation andchartscope.- Returns:
- new gradient based on color scheme
-
createGradient
public default Gradient createGradient(GradientType type)
Creates a gradient by a type, withchartscope.- 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, withchartscope.- 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
-
-