Package org.knowm.xchart.style.colors
Enum ChartColor
- java.lang.Object
-
- java.lang.Enum<ChartColor>
-
- org.knowm.xchart.style.colors.ChartColor
-
- All Implemented Interfaces:
Serializable
,Comparable<ChartColor>
public enum ChartColor extends Enum<ChartColor>
Pre-defined Colors used for various Chart Elements- Author:
- timmolter
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BLACK
BLACKDARK_GREY
DARK_GREYGREY
GREYLIGHT_GREY
LIGHT_GREYWHITE
WHITE
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Color
getAWTColor(ChartColor chartColor)
Get a AWT Color Objectstatic ChartColor
valueOf(String name)
Returns the enum constant of this type with the specified name.static ChartColor[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BLACK
public static final ChartColor BLACK
BLACK
-
DARK_GREY
public static final ChartColor DARK_GREY
DARK_GREY
-
GREY
public static final ChartColor GREY
GREY
-
LIGHT_GREY
public static final ChartColor LIGHT_GREY
LIGHT_GREY
-
WHITE
public static final ChartColor WHITE
WHITE
-
-
Method Detail
-
values
public static ChartColor[] 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 (ChartColor c : ChartColor.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ChartColor 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
-
getAWTColor
public static Color getAWTColor(ChartColor chartColor)
Get a AWT Color Object- Parameters:
chartColor
-- Returns:
- a AWT Color Object
-
-