public class ColorConstant extends java.lang.Object implements IColorConstant
BLACK, BLUE, CONNECTION_SELECTION_FG, CYAN, DARK_BLUE, DARK_GRAY, DARK_GREEN, DARK_ORANGE, GRAY, GREEN, HANDLE_BG, HANDLE_FG, LIGHT_BLUE, LIGHT_GRAY, LIGHT_GREEN, LIGHT_LIGHT_GRAY, LIGHT_ORANGE, ORANGE, RED, SHAPE_SELECTION_FG, WHITE, YELLOW| Constructor and Description |
|---|
ColorConstant(int red,
int green,
int blue)
Creates a new
ColorConstant given the desired red, green and blue
values expressed as ints in the range 0 to 255 (where 0 is black and 255
is full brightness). |
ColorConstant(java.lang.String hexRGBString)
Creates a new
ColorConstant for for a given String, which defines
the RGB values in hexadecimal format. |
| Modifier and Type | Method and Description |
|---|---|
int |
getBlue()
Returns the amount of blue in the color, from 0 to 255.
|
int |
getGreen()
Returns the amount of green in the color, from 0 to 255.
|
int |
getRed()
Returns the amount of red in the color, from 0 to 255.
|
public ColorConstant(int red,
int green,
int blue)
ColorConstant given the desired red, green and blue
values expressed as ints in the range 0 to 255 (where 0 is black and 255
is full brightness).red - the amount of red in the colorgreen - the amount of green in the colorblue - the amount of blue in the colorpublic ColorConstant(java.lang.String hexRGBString)
ColorConstant for for a given String, which defines
the RGB values in hexadecimal format. This means, that the String must
have a length of 6 characters. Example: getColor("FF0000")
returns a red color.hexRGBString - The RGB values in hexadecimal format.public int getRed()
IColorConstantgetRed in interface IColorConstantpublic int getGreen()
IColorConstantgetGreen in interface IColorConstantpublic int getBlue()
IColorConstantgetBlue in interface IColorConstant