NextApp Echo2
v2.1.0

nextapp.echo2.app
Class Color

java.lang.Object
  extended by nextapp.echo2.app.Color
All Implemented Interfaces:
java.io.Serializable

public class Color
extends java.lang.Object
implements java.io.Serializable

A representation of a 24-bit RGB color.

See Also:
Serialized Form

Field Summary
static Color BLACK
          The color black.
static Color BLUE
          The color blue.
static Color CYAN
          The color cyan.
static Color DARKGRAY
          The color dark gray.
static Color GREEN
          The color green.
static Color LIGHTGRAY
          The color light gray.
static Color MAGENTA
          The color magenta.
static Color ORANGE
          The color orange.
static Color PINK
          The color pink.
static Color RED
          The color red.
static Color WHITE
          The color white.
static Color YELLOW
          The color yellow.
 
Constructor Summary
Color(int rgb)
          Creates a new color from an integer value.
Color(int r, int g, int b)
          Creates a new color with specified red, green, and blue values.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int getBlue()
          Returns the blue component value of this color.
 int getGreen()
          Returns the green component value of this color.
 int getRed()
          Returns the red component value of this color.
 int getRgb()
          Returns the color as an RGB value.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

BLACK

public static final Color BLACK
The color black.


BLUE

public static final Color BLUE
The color blue.


GREEN

public static final Color GREEN
The color green.


CYAN

public static final Color CYAN
The color cyan.


RED

public static final Color RED
The color red.


MAGENTA

public static final Color MAGENTA
The color magenta.


YELLOW

public static final Color YELLOW
The color yellow.


WHITE

public static final Color WHITE
The color white.


DARKGRAY

public static final Color DARKGRAY
The color dark gray.


LIGHTGRAY

public static final Color LIGHTGRAY
The color light gray.


ORANGE

public static final Color ORANGE
The color orange.


PINK

public static final Color PINK
The color pink.

Constructor Detail

Color

public Color(int rgb)
Creates a new color from an integer value. The value should be of the for 0xRRGGBB.

Parameters:
rgb - an integer representation for a color

Color

public Color(int r,
             int g,
             int b)
Creates a new color with specified red, green, and blue values. Each value may range from 0 to 255.

Parameters:
r - the red component value
g - the green component value
b - the blue component value
Method Detail

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

getBlue

public int getBlue()
Returns the blue component value of this color.

Returns:
the blue component value of this color, from 0 to 255

getGreen

public int getGreen()
Returns the green component value of this color.

Returns:
the green component value of this color, from 0 to 255

getRed

public int getRed()
Returns the red component value of this color.

Returns:
the red component value of this color, from 0 to 255

getRgb

public int getRgb()
Returns the color as an RGB value.

Returns:
the color as an RGB value

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

NextApp Echo2
v2.1.0