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 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
  • 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

      public static final CommonColors WHITE
      Deprecated.
      The white color (255,255,255).
    • BLACK

      public static final CommonColors BLACK
      Deprecated.
      The black color (0,0,0).
    • RED

      public static final CommonColors RED
      Deprecated.
      The red color
    • GREEN

      public static final CommonColors GREEN
      Deprecated.
      The green color
    • BLUE

      public static final CommonColors BLUE
      Deprecated.
      The blue color
    • CYAN

      public static final CommonColors CYAN
      Deprecated.
      The cyan (light blue) color
    • MAGENTA

      public static final CommonColors MAGENTA
      Deprecated.
      The magenta color
    • YELLOW

      public static final CommonColors YELLOW
      Deprecated.
      The yellow color
    • GRAY

      public static final CommonColors GRAY
      Deprecated.
      The White color
    • DARK_GRAY

      public static final CommonColors DARK_GRAY
      Deprecated.
      The dark gray color
    • LIGHT_GRAY

      public static final CommonColors LIGHT_GRAY
      Deprecated.
      The light gray color
  • Method Details

    • values

      public static CommonColors[] 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

      public static CommonColors valueOf​(java.lang.String name)
      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 name
      java.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 class java.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

      public static CommonColors fromLabel​(java.lang.String label)
      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.