Enum ColorHelper.NamedColor
- java.lang.Object
-
- java.lang.Enum<ColorHelper.NamedColor>
-
- net.sf.jguiraffe.gui.builder.components.ColorHelper.NamedColor
-
- All Implemented Interfaces:
Serializable
,Comparable<ColorHelper.NamedColor>
- Enclosing class:
- ColorHelper
public static enum ColorHelper.NamedColor extends Enum<ColorHelper.NamedColor>
An enumeration with predefined color constants. The names defined here can be passed togetPredefinedColor()
.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BLACK
Default color black.BLUE
Default color blue.CYAN
Default color cyan.DARK_GRAY
Default color dark gray.GRAY
Default color gray.GREEN
Default color green.LIGHT_GRAY
Default color light gray.MAGENTA
Default color magenta.ORANGE
Default color orange.PINK
Default color pink.RED
Default color red.WHITE
Default color white.YELLOW
Default color yellow.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Color
getColor()
Returns the associatedColor
object.static ColorHelper.NamedColor
valueOf(String name)
Returns the enum constant of this type with the specified name.static ColorHelper.NamedColor[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BLACK
public static final ColorHelper.NamedColor BLACK
Default color black.
-
BLUE
public static final ColorHelper.NamedColor BLUE
Default color blue.
-
CYAN
public static final ColorHelper.NamedColor CYAN
Default color cyan.
-
DARK_GRAY
public static final ColorHelper.NamedColor DARK_GRAY
Default color dark gray.
-
GRAY
public static final ColorHelper.NamedColor GRAY
Default color gray.
-
GREEN
public static final ColorHelper.NamedColor GREEN
Default color green.
-
LIGHT_GRAY
public static final ColorHelper.NamedColor LIGHT_GRAY
Default color light gray.
-
MAGENTA
public static final ColorHelper.NamedColor MAGENTA
Default color magenta.
-
ORANGE
public static final ColorHelper.NamedColor ORANGE
Default color orange.
-
PINK
public static final ColorHelper.NamedColor PINK
Default color pink.
-
RED
public static final ColorHelper.NamedColor RED
Default color red.
-
WHITE
public static final ColorHelper.NamedColor WHITE
Default color white.
-
YELLOW
public static final ColorHelper.NamedColor YELLOW
Default color yellow.
-
-
Method Detail
-
values
public static ColorHelper.NamedColor[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ColorHelper.NamedColor c : ColorHelper.NamedColor.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ColorHelper.NamedColor valueOf(String name)
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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getColor
public Color getColor()
Returns the associatedColor
object.- Returns:
- the
Color
represented by this object
-
-