public enum CColor extends Enum<CColor> implements LocalizableEnumeration
Color
.Enum Constant and Description |
---|
BLACK
Black.
|
BLUE
Blue.
|
CYAN
Cyan.
|
DARK_GRAY
Dark gray.
|
GRAY
Gray.
|
GREEN
Green.
|
LIGHT_GRAY
Light gray.
|
MAGENTA
Magenta.
|
ORANGE
Orange.
|
PINK
Pink.
|
RED
Red.
|
WHITE
White.
|
YELLOW
Yellow.
|
Modifier and Type | Method and Description |
---|---|
int |
getBlue()
Gets the blue component of this CColor.
|
Serializable |
getCode()
Gets the code of this CColor which equals the name() of this CColor.
|
CodeDescription |
getCodeDescription(Locale locale)
Gets the CodeDescription of this CColor.
|
static List<CodeDescription> |
getCodeDescriptions(Locale locale)
Gets a List of
CodeDescription objects for all the CColors. |
String |
getDescription(Locale locale)
Gets the localized description of this CColor.
|
int |
getGreen()
Gets the green component of this CColor.
|
int |
getRed()
Gets the red component of this CColor.
|
static CColor |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CColor[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CColor RED
public static final CColor GREEN
public static final CColor BLUE
public static final CColor BLACK
public static final CColor WHITE
public static final CColor CYAN
public static final CColor DARK_GRAY
public static final CColor GRAY
public static final CColor LIGHT_GRAY
public static final CColor MAGENTA
public static final CColor ORANGE
public static final CColor PINK
public static final CColor YELLOW
public static CColor[] values()
for (CColor c : CColor.values()) System.out.println(c);
public static CColor valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getRed()
public int getGreen()
public int getBlue()
public Serializable getCode()
getCode
in interface LocalizableEnumeration
public String getDescription(Locale locale)
getDescription
in interface Localizable
getDescription
in interface LocalizableEnumeration
locale
- Locale used to localize the description.
public CodeDescription getCodeDescription(Locale locale)
getCodeDescription
in interface LocalizableEnumeration
locale
- Locale used to localize the description.
public static List<CodeDescription> getCodeDescriptions(Locale locale)
CodeDescription
objects for all the CColors.locale
- Locale used to localize the descriptions.
CodeDescription
objects for all the CColors.Copyright © 2008–2018. All rights reserved.