|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--waba.fx.Color
Color represents a color.
A color is defined as a mixture of red, green and blue color values. Each value is in the range of 0 to 255 where 0 is darkest and 255 is brightest. For example, Color(255, 0, 0) is the color red.
Here are some more examples:
| Field Summary | |
static Color |
BLACK
|
protected int |
blue
|
static Color |
BLUE
|
protected Color |
bright
|
static Color |
BRIGHT
|
static Color |
CYAN
|
protected Color |
dark
|
static Color |
DARK
|
int |
equ
for fast comparisions. 2 colors are equal if their equ have the same value |
protected int |
gray
|
protected int |
green
|
static Color |
GREEN
|
static Color |
MAGENTA
|
static Color |
ORANGE
|
static Color |
PINK
|
protected int |
red
|
static Color |
RED
|
protected int |
rgb
|
static Color |
WHITE
|
static int |
WHITE_PIXEL
|
static Color |
YELLOW
|
| Constructor Summary | |
Color(int rgb)
Deprecated. Color is now a singleton. Use Color.getColor instead. |
|
Color(int red,
int green,
int blue)
Deprecated. Color is now a singleton. Use Color.getColor instead. |
|
Color(java.lang.String rrggbb)
Deprecated. Color is now a singleton. Use Color.getColor instead. |
|
| Method Summary | |
Color |
brighter()
return a color that is brighter than the current one. if grayscale, returns the following brighter color |
Color |
brighter(int step)
return a color that is brighter than the current one. if grayscale, returns the following brighter color |
Color |
darker()
return a color that is darker than the current one. if grayscale, returns the following darker color |
Color |
darker(int step)
return a color that is darker than the current one. if grayscale, returns the following darker color |
boolean |
equals(java.lang.Object obj)
Returns true if this color equals to the other color. if in grayScale mode, returns true if both grayValues are equal. |
int |
getAlpha()
Returns the alpha channel of this Color in a value from 0 to 255 |
int |
getBlue()
Returns the blue value of the color. |
static Color |
getColor(int rgb)
Constructs a color object with the given rgb |
static Color |
getColor(int red,
int green,
int blue)
Constructs a color object with the given red, green and blue components. |
static Color |
getColor(java.lang.String rrggbb)
Constructs a color object with the given rgb |
Color |
getCursorColor()
Returns the best cursor color depending on this color |
int |
getGray()
Returns this index of the color in gray scale mode. |
int |
getGreen()
Returns the green value of the color. |
int |
getRed()
Returns the red value of the color. |
int |
getRGB()
Returns the current color as 0x00RRGGBB |
Color |
halfDarker()
return a color that is even less darker than the current one. if grayscale, returns the following darker color |
int |
hashCode()
returns the best hash code for this color (equ) |
Color |
lessBrighter()
return a color that is less brighter than the current one. if grayscale, returns the following brighter color |
Color |
lessDarker()
return a color that is less darker than the current one. if grayscale, returns the following darker color |
java.lang.String |
toString()
Returns the string representation of this color: the rgb in hexadecimal |
| Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
protected int red
protected int green
protected int blue
protected int rgb
protected int gray
public int equ
protected Color bright
protected Color dark
public static final Color WHITE
public static final Color BRIGHT
public static final Color DARK
public static final Color BLACK
public static final Color RED
public static final Color PINK
public static final Color ORANGE
public static final Color YELLOW
public static final Color GREEN
public static final Color MAGENTA
public static final Color CYAN
public static final Color BLUE
public static final int WHITE_PIXEL
| Constructor Detail |
public Color(int red,
int green,
int blue)
red - the red value in the range of 0 to 255green - the green value in the range of 0 to 255blue - the blue value in the range of 0 to 255public Color(int rgb)
rgb - a color in the format 0x00RRGGBBpublic Color(java.lang.String rrggbb)
rrggbb - a string in the format RRGGBB (colors in hex).| Method Detail |
public static Color getColor(int red,
int green,
int blue)
red - the red value in the range of 0 to 255green - the green value in the range of 0 to 255blue - the blue value in the range of 0 to 255public static Color getColor(int rgb)
rgb - a color in the format 0x00RRGGBBpublic static Color getColor(java.lang.String rrggbb)
rrggbb - a string in the format RRGGBB (colors in hex).public int getAlpha()
public int getBlue()
public int getGreen()
public int getRed()
public int getGray()
public int getRGB()
public int hashCode()
public boolean equals(java.lang.Object obj)
public Color brighter()
public Color darker()
public Color lessBrighter()
public Color lessDarker()
public Color halfDarker()
public Color getCursorColor()
public Color brighter(int step)
public Color darker(int step)
public java.lang.String toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||