@Deprecated public enum CommonColors extends Enum<CommonColors>
A collection of common colors used for creating overlays, choosing background color...
Example:
// Use a generic dialog to choose a color
GenericDialog gd = new GenericDialog();
gd.addChoice("Color", CommonColors.getAllLabels());
gd.showDialog();
// extract the color from the name
String colorName = gd.getNextChoice();
Color color = CommonColors.fromLabel(colorName).getColor();
Enum Constant and Description |
---|
BLACK
Deprecated.
The black color (0,0,0).
|
BLUE
Deprecated.
The blue color
|
CYAN
Deprecated.
The cyan (light blue) color
|
DARK_GRAY
Deprecated.
The dark gray color
|
GRAY
Deprecated.
The White color
|
GREEN
Deprecated.
The green color
|
LIGHT_GRAY
Deprecated.
The light gray color
|
MAGENTA
Deprecated.
The magenta color
|
RED
Deprecated.
The red color
|
WHITE
Deprecated.
The white color (255,255,255).
|
YELLOW
Deprecated.
The yellow color
|
Modifier and Type | Method and Description |
---|---|
static CommonColors |
fromLabel(String label)
Deprecated.
Determines the operation type from its label.
|
static String[] |
getAllLabels()
Deprecated.
Returns all the labels for this enumeration.
|
Color |
getColor()
Deprecated.
|
String |
getLabel()
Deprecated.
|
String |
toString()
Deprecated.
|
static CommonColors |
valueOf(String name)
Deprecated.
Returns the enum constant of this type with the specified name.
|
static CommonColors[] |
values()
Deprecated.
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CommonColors WHITE
public static final CommonColors BLACK
public static final CommonColors RED
public static final CommonColors GREEN
public static final CommonColors BLUE
public static final CommonColors CYAN
public static final CommonColors MAGENTA
public static final CommonColors YELLOW
public static final CommonColors GRAY
public static final CommonColors DARK_GRAY
public static final CommonColors LIGHT_GRAY
public static CommonColors[] values()
for (CommonColors c : CommonColors.values()) System.out.println(c);
public static CommonColors 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 String getLabel()
public Color getColor()
public String toString()
toString
in class Enum<CommonColors>
public static String[] getAllLabels()
public static CommonColors fromLabel(String label)
label
- the name of the colorIllegalArgumentException
- if color name is not recognized.Copyright © 2014–2023 INRA-IJPB Modeling and Digital Imaging lab. All rights reserved.