|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectColor
public class Color
Represents a color with red, green, and blue components.
| Field Summary | |
|---|---|
static Color |
BLACK
|
static Color |
WHITE
|
| Constructor Summary | |
|---|---|
Color(double r,
double g,
double b)
Constructs a color with the given color components. |
|
Color(float r,
float g,
float b)
Constructs a color with the given color components. |
|
| Method Summary | |
|---|---|
Color |
add(Color other)
Constructs a color whose color components are the sum of this color's components and the parameter color's components. |
float |
getBlue()
Returns the blue color component. |
float |
getGreen()
Returns the green color component. |
float |
getRed()
Returns the red color component. |
int |
getRGB()
Returns the argb encoding of this color. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Color BLACK
public static final Color WHITE
| Constructor Detail |
|---|
public Color(double r,
double g,
double b)
public Color(float r,
float g,
float b)
| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic float getRed()
public float getGreen()
public float getBlue()
public Color add(Color other)
public int getRGB()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||