public enum Color extends Enum<Color>
| Enum Constant and Description |
|---|
BLUE |
DARK_BLUE |
DARK_RED |
GREEN |
LIGHT_BLUE |
LIGHT_GREEN |
ORANGE |
PURPLE |
RED |
YELLOW |
| Modifier and Type | Method and Description |
|---|---|
static Color |
fromCode(String code)
Get a color based on its color code (either Word or Excel).
|
static Color |
fromName(String name)
Get a color based on its name.
|
String |
getExcelColorCode()
Get the color's Excel Color Code.
|
String |
getName()
Get the color's name.
|
String |
getWordColorCode()
Get the color's Word Color Code.
|
static Color |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Color[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Color BLUE
public static final Color LIGHT_BLUE
public static final Color GREEN
public static final Color PURPLE
public static final Color RED
public static final Color YELLOW
public static final Color DARK_RED
public static final Color LIGHT_GREEN
public static final Color ORANGE
public static final Color DARK_BLUE
public static Color[] values()
for (Color c : Color.values()) System.out.println(c);
public static Color 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 static Color fromName(String name)
name - the name to find.Colors or null if not found.public static Color fromCode(String code)
code - the code to find.Colors or null if not found.public String getName()
public String getExcelColorCode()
public String getWordColorCode()
Copyright © 2021. All rights reserved.