|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnextapp.echo.Color
public class Color
A representation of an RGB color.
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)
Determines whether another object is equal to this Color . |
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()
Returns a hash code value for the object. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Color BLACK
public static final Color BLUE
public static final Color GREEN
public static final Color CYAN
public static final Color RED
public static final Color MAGENTA
public static final Color YELLOW
public static final Color WHITE
public static final Color DARKGRAY
public static final Color LIGHTGRAY
public static final Color ORANGE
public static final Color PINK
Constructor Detail |
---|
public Color(int rgb)
rgb
- An integer representation for a color.public Color(int r, int g, int b)
r
- The red component value.g
- The green component value.b
- The blue component value.Method Detail |
---|
public boolean equals(java.lang.Object o)
Color
.
equals
in class java.lang.Object
o
- The object with which to compare this color.
public int getBlue()
public int getGreen()
public int getRed()
public int getRgb()
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |