|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectColor139
public class Color139
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 Color139 |
BLACK
|
static Color139 |
BLUE
|
static Color139 |
CYAN
|
static Color139 |
GREEN
|
static Color139 |
MAGENTA
|
static Color139 |
RED
|
static Color139 |
WHITE
|
static Color139 |
YELLOW
|
Constructor Summary | |
---|---|
Color139(int redComponent,
int greenComponent,
int blueComponent)
This constructor creates a Color139 object with the specified RGB component values. |
Method Summary | |
---|---|
Color139 |
add(Color139 other)
The method returns a new Color139 value that is the sum of this color and the other color. |
Color139 |
brighten()
The method returns a brighter new Color139 value. |
Color139 |
darken()
The method returns a darker new Color139 value. |
Color139 |
dim()
The method returns a dimmer new Color139 value. |
boolean |
equals(Color139 other)
This method returns true if this color is equal to the other color and returns false if it is not equal. |
Color139 |
lighten()
The method returns a lighter new Color139 value. |
Color139 |
sub(Color139 other)
The method returns a new Color139 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 Color139 BLACK
public static final Color139 RED
public static final Color139 GREEN
public static final Color139 YELLOW
public static final Color139 BLUE
public static final Color139 MAGENTA
public static final Color139 CYAN
public static final Color139 WHITE
Constructor Detail |
---|
public Color139(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(Color139 other)
other
- The color to be compared to this color
public Color139 lighten()
public Color139 darken()
public Color139 brighten()
public Color139 dim()
public Color139 add(Color139 other)
other
- The color to be added to this color
public Color139 sub(Color139 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 |