public enum NamedColor extends java.lang.Enum<NamedColor>
Enum Constant and Description |
---|
ASIS |
BLACK |
BLUE |
CYAN |
GREEN |
MAGENTA |
RED |
WHITE |
YELLOW |
Modifier and Type | Method and Description |
---|---|
java.awt.Color |
getColor() |
java.lang.String |
toString() |
static NamedColor |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static NamedColor[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NamedColor ASIS
public static final NamedColor BLACK
public static final NamedColor RED
public static final NamedColor BLUE
public static final NamedColor GREEN
public static final NamedColor YELLOW
public static final NamedColor CYAN
public static final NamedColor MAGENTA
public static final NamedColor WHITE
public static NamedColor[] values()
for (NamedColor c : NamedColor.values()) System.out.println(c);
public static NamedColor valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String toString()
toString
in class java.lang.Enum<NamedColor>
public java.awt.Color getColor()