Package inra.ijpb.util
Enum CommonColors
java.lang.Object
java.lang.Enum<CommonColors>
inra.ijpb.util.CommonColors
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<CommonColors>
,java.lang.constant.Constable
@Deprecated public enum CommonColors extends java.lang.Enum<CommonColors>
Deprecated.
use inra.ijpb.color.CommonColors instead (v1.4.3)
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();
- Author:
- dlegland
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
-
Enum Constant Summary
Enum Constants Enum Constant Description BLACK
Deprecated.The black color (0,0,0).BLUE
Deprecated.The blue colorCYAN
Deprecated.The cyan (light blue) colorDARK_GRAY
Deprecated.The dark gray colorGRAY
Deprecated.The White colorGREEN
Deprecated.The green colorLIGHT_GRAY
Deprecated.The light gray colorMAGENTA
Deprecated.The magenta colorRED
Deprecated.The red colorWHITE
Deprecated.The white color (255,255,255).YELLOW
Deprecated.The yellow color -
Method Summary
Modifier and Type Method Description static CommonColors
fromLabel(java.lang.String label)
Deprecated.Determines the operation type from its label.static java.lang.String[]
getAllLabels()
Deprecated.Returns all the labels for this enumeration.java.awt.Color
getColor()
Deprecated.java.lang.String
getLabel()
Deprecated.java.lang.String
toString()
Deprecated.static CommonColors
valueOf(java.lang.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.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
-
Enum Constant Details
-
WHITE
Deprecated.The white color (255,255,255). -
BLACK
Deprecated.The black color (0,0,0). -
RED
Deprecated.The red color -
GREEN
Deprecated.The green color -
BLUE
Deprecated.The blue color -
CYAN
Deprecated.The cyan (light blue) color -
MAGENTA
Deprecated.The magenta color -
YELLOW
Deprecated.The yellow color -
GRAY
Deprecated.The White color -
DARK_GRAY
Deprecated.The dark gray color -
LIGHT_GRAY
Deprecated.The light gray color
-
-
Method Details
-
values
Deprecated.Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Deprecated.Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getLabel
public java.lang.String getLabel()Deprecated.- Returns:
- the label associated to this enumeration item
-
getColor
public java.awt.Color getColor()Deprecated.- Returns:
- the java color corresponding to this enumeration item
-
toString
public java.lang.String toString()Deprecated.- Overrides:
toString
in classjava.lang.Enum<CommonColors>
- Returns:
- a string representation of this enumeration item
-
getAllLabels
public static java.lang.String[] getAllLabels()Deprecated.Returns all the labels for this enumeration.- Returns:
- all the labels for this enumeration.
-
fromLabel
Deprecated.Determines the operation type from its label.- Parameters:
label
- the name of the color- Returns:
- the Colors enumeration corresponding to the name
- Throws:
java.lang.IllegalArgumentException
- if color name is not recognized.
-