|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Color149
public class Color149
This class implements a color object. Colors are defined by three component colors: red, green, blue. Each of these three components has a value betwen 0 and 255.
Field Summary | |
---|---|
static Color149 |
BLACK
|
static Color149 |
BLUE
|
static Color149 |
CYAN
|
static Color149 |
GREEN
|
static Color149 |
MAGENTA
|
static Color149 |
RED
|
static Color149 |
WHITE
|
static Color149 |
YELLOW
|
Constructor Summary | |
---|---|
Color149(int redComponent,
int greenComponent,
int blueComponent)
This constructor creates a Color149 object with the specified RGB component values. |
Method Summary | |
---|---|
Color149 |
add(Color149 other)
The method returns a new Color149 value that is the sum of this color and the other color. |
Color149 |
brighten()
The method returns a brighter new Color149 value. |
Color149 |
darken()
The method returns a darker new Color149 value. |
Color149 |
dim()
The method returns a dimmer new Color149 value. |
boolean |
equals(Color149 other)
This method returns true if this color is equal to the other color and returns false if it is not equal. |
Color149 |
lighten()
The method returns a lighter new Color149 value. |
Color149 |
sub(Color149 other)
The method returns a new Color149 value that is the difference between this color and the other color. |
java.lang.String |
toString()
This method returns a string representation of the color in the form "#RRGGBB" where RR, GG, and BB are the red, green and blue component values expressed as hexidecimal digits. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Color149 BLACK
public static final Color149 RED
public static final Color149 GREEN
public static final Color149 YELLOW
public static final Color149 BLUE
public static final Color149 MAGENTA
public static final Color149 CYAN
public static final Color149 WHITE
Constructor Detail |
---|
public Color149(int redComponent, int greenComponent, int blueComponent)
redComponent
- The color's red component as a value 0-255greenComponent
- The color's green component as a value 0-255blueComponent
- The color's blue component as a value 0-255Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(Color149 other)
other
- The color to be compared to this color
public Color149 lighten()
public Color149 darken()
public Color149 brighten()
public Color149 dim()
public Color149 add(Color149 other)
other
- The color to be added to this color
public Color149 sub(Color149 other)
other
- The color to be subtracted from this color
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |