public enum PlayerColor extends java.lang.Enum<PlayerColor>
getBackgroundColor()
method.Enum Constant and Description |
---|
BLACK |
BLUE |
BROWN |
GOLD |
GREEN |
INDIGO |
ORANGE |
PINE |
PURPLE |
RED |
SILVER |
SKY |
Modifier and Type | Field and Description |
---|---|
private java.awt.Color |
backgroundColor |
private java.awt.Color |
foregroundColor |
private int |
mnemonic |
private java.lang.String |
name |
private java.lang.String |
shortName |
Modifier and Type | Method and Description |
---|---|
java.awt.Color |
getBackgroundColor() |
static java.util.List<PlayerColor> |
getByName(java.util.List<java.lang.String> names) |
static PlayerColor |
getByName(java.lang.String name) |
static PlayerColor |
getByShortName(java.lang.String shortName) |
java.awt.Color |
getForegroundColor() |
int |
getMnemonic() |
java.lang.String |
getName() |
java.lang.String |
getShortName() |
java.lang.String |
toString() |
static PlayerColor |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static PlayerColor[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PlayerColor BLACK
public static final PlayerColor BLUE
public static final PlayerColor BROWN
public static final PlayerColor GOLD
public static final PlayerColor GREEN
public static final PlayerColor RED
public static final PlayerColor ORANGE
public static final PlayerColor PURPLE
public static final PlayerColor SILVER
public static final PlayerColor SKY
public static final PlayerColor PINE
public static final PlayerColor INDIGO
private final java.lang.String name
private final java.lang.String shortName
private final int mnemonic
private final java.awt.Color backgroundColor
private final java.awt.Color foregroundColor
public static PlayerColor[] values()
for (PlayerColor c : PlayerColor.values()) System.out.println(c);
public static PlayerColor 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 int getMnemonic()
public java.lang.String getName()
public java.lang.String getShortName()
public java.awt.Color getBackgroundColor()
public java.awt.Color getForegroundColor()
public static PlayerColor getByName(java.lang.String name)
public static PlayerColor getByShortName(java.lang.String shortName)
public static java.util.List<PlayerColor> getByName(java.util.List<java.lang.String> names)
public java.lang.String toString()
toString
in class java.lang.Enum<PlayerColor>