Package org.knowm.xchart.style.colors
Enum ChartColor
- java.lang.Object
-
- java.lang.Enum<ChartColor>
-
- org.knowm.xchart.style.colors.ChartColor
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ChartColor>
public enum ChartColor extends java.lang.Enum<ChartColor>
Pre-defined Colors used for various Chart Elements
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.awt.Colorcolor
-
Constructor Summary
Constructors Modifier Constructor Description privateChartColor(java.awt.Color color)Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.ColorgetColor()java.awt.ColorgetColorTranslucent()static ChartColorvalueOf(java.lang.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
-
RED
public static final ChartColor RED
RED
-
BLUE
public static final ChartColor BLUE
BLUE
-
GREEN
public static final ChartColor GREEN
GREEN
-
-
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(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getColor
public java.awt.Color getColor()
-
getColorTranslucent
public java.awt.Color getColorTranslucent()
-
-