net.sf.sbcc.colorcombo
Class NamedColor

java.lang.Object
  extended by java.awt.Color
      extended by net.sf.sbcc.colorcombo.NamedColor
All Implemented Interfaces:
java.awt.Paint, java.awt.Transparency, java.io.Serializable
Direct Known Subclasses:
JColorComboBox.IndividualNamedColor

public class NamedColor
extends java.awt.Color

This class implements Colors which additionally hold a color's name.

Version:
$Revision: 1.1 $
Author:
Christoph Bimminger
See Also:
Serialized Form

Field Summary
static java.awt.Color black
          The color black.
static java.awt.Color BLACK
          The color black.
static java.awt.Color blue
          The color blue.
static java.awt.Color BLUE
          The color blue.
static java.awt.Color cyan
          The color cyan.
static java.awt.Color CYAN
          The color cyan.
static java.awt.Color DARK_GRAY
          The color dark gray.
static java.awt.Color darkGray
          The color dark gray.
static java.awt.Color gray
          The color gray.
static java.awt.Color GRAY
          The color gray.
static java.awt.Color green
          The color green.
static java.awt.Color GREEN
          The color green.
static java.awt.Color LIGHT_GRAY
          The color light gray.
static java.awt.Color lightGray
          The color light gray.
static java.awt.Color magenta
          The color magenta.
static java.awt.Color MAGENTA
          The color magenta.
private  java.lang.String name
           
static java.awt.Color orange
          The color orange.
static java.awt.Color ORANGE
          The color orange.
static java.awt.Color pink
          The color pink.
static java.awt.Color PINK
          The color pink.
static java.awt.Color red
          The color red.
static java.awt.Color RED
          The color red.
static java.awt.Color white
           
static java.awt.Color WHITE
          The color white.
static java.awt.Color yellow
          The color yellow.
static java.awt.Color YELLOW
          The color yellow.
 
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
 
Constructor Summary
NamedColor(java.lang.String P_name, java.awt.Color P_color)
           
NamedColor(java.lang.String P_name, java.awt.color.ColorSpace cspace, float[] components, float alpha)
           
NamedColor(java.lang.String P_name, float r, float g, float b)
           
NamedColor(java.lang.String P_name, float r, float g, float b, float a)
           
NamedColor(java.lang.String P_name, int rgb)
           
NamedColor(java.lang.String P_name, int rgba, boolean hasalpha)
           
NamedColor(java.lang.String P_name, int r, int g, int b)
           
NamedColor(java.lang.String P_name, int r, int g, int b, int a)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String toString()
           
 
Methods inherited from class java.awt.Color
brighter, createContext, darker, decode, getAlpha, getBlue, getColor, getColor, getColor, getColorComponents, getColorComponents, getColorSpace, getComponents, getComponents, getGreen, getHSBColor, getRed, getRGB, getRGBColorComponents, getRGBComponents, getTransparency, hashCode, HSBtoRGB, RGBtoHSB
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

white

public static final java.awt.Color white

WHITE

public static final java.awt.Color WHITE
The color white. In the default sRGB space.


lightGray

public static final java.awt.Color lightGray
The color light gray. In the default sRGB space.


LIGHT_GRAY

public static final java.awt.Color LIGHT_GRAY
The color light gray. In the default sRGB space.


gray

public static final java.awt.Color gray
The color gray. In the default sRGB space.


GRAY

public static final java.awt.Color GRAY
The color gray. In the default sRGB space.


darkGray

public static final java.awt.Color darkGray
The color dark gray. In the default sRGB space.


DARK_GRAY

public static final java.awt.Color DARK_GRAY
The color dark gray. In the default sRGB space.


black

public static final java.awt.Color black
The color black. In the default sRGB space.


BLACK

public static final java.awt.Color BLACK
The color black. In the default sRGB space.


red

public static final java.awt.Color red
The color red. In the default sRGB space.


RED

public static final java.awt.Color RED
The color red. In the default sRGB space.


pink

public static final java.awt.Color pink
The color pink. In the default sRGB space.


PINK

public static final java.awt.Color PINK
The color pink. In the default sRGB space.


orange

public static final java.awt.Color orange
The color orange. In the default sRGB space.


ORANGE

public static final java.awt.Color ORANGE
The color orange. In the default sRGB space.


yellow

public static final java.awt.Color yellow
The color yellow. In the default sRGB space.


YELLOW

public static final java.awt.Color YELLOW
The color yellow. In the default sRGB space.


green

public static final java.awt.Color green
The color green. In the default sRGB space.


GREEN

public static final java.awt.Color GREEN
The color green. In the default sRGB space.


magenta

public static final java.awt.Color magenta
The color magenta. In the default sRGB space.


MAGENTA

public static final java.awt.Color MAGENTA
The color magenta. In the default sRGB space.


cyan

public static final java.awt.Color cyan
The color cyan. In the default sRGB space.


CYAN

public static final java.awt.Color CYAN
The color cyan. In the default sRGB space.


blue

public static final java.awt.Color blue
The color blue. In the default sRGB space.


BLUE

public static final java.awt.Color BLUE
The color blue. In the default sRGB space.


name

private java.lang.String name
Constructor Detail

NamedColor

public NamedColor(java.lang.String P_name,
                  java.awt.color.ColorSpace cspace,
                  float[] components,
                  float alpha)
Parameters:
cspace -
components -
alpha -

NamedColor

public NamedColor(java.lang.String P_name,
                  float r,
                  float g,
                  float b,
                  float a)
Parameters:
r -
g -
b -
a -

NamedColor

public NamedColor(java.lang.String P_name,
                  float r,
                  float g,
                  float b)
Parameters:
r -
g -
b -

NamedColor

public NamedColor(java.lang.String P_name,
                  int rgba,
                  boolean hasalpha)
Parameters:
rgba -
hasalpha -

NamedColor

public NamedColor(java.lang.String P_name,
                  int r,
                  int g,
                  int b,
                  int a)
Parameters:
r -
g -
b -
a -

NamedColor

public NamedColor(java.lang.String P_name,
                  int r,
                  int g,
                  int b)
Parameters:
r -
g -
b -

NamedColor

public NamedColor(java.lang.String P_name,
                  int rgb)
Parameters:
rgb -

NamedColor

public NamedColor(java.lang.String P_name,
                  java.awt.Color P_color)
Parameters:
rgb -
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.awt.Color

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.awt.Color