Package org.eclipse.graphiti.util
Class ColorConstant
- java.lang.Object
-
- org.eclipse.graphiti.util.ColorConstant
-
- All Implemented Interfaces:
IColorConstant
public class ColorConstant extends java.lang.Object implements IColorConstant
The Class ColorConstant.
-
-
Field Summary
-
Fields inherited from interface org.eclipse.graphiti.util.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 Summary
Constructors Constructor Description ColorConstant(int red, int green, int blue)Creates a newColorConstantgiven 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 newColorConstantfor for a given String, which defines the RGB values in hexadecimal format.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBlue()Returns the amount of blue in the color, from 0 to 255.intgetGreen()Returns the amount of green in the color, from 0 to 255.intgetRed()Returns the amount of red in the color, from 0 to 255.
-
-
-
Constructor Detail
-
ColorConstant
public ColorConstant(int red, int green, int blue)Creates a newColorConstantgiven 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).- Parameters:
red- the amount of red in the colorgreen- the amount of green in the colorblue- the amount of blue in the color
-
ColorConstant
public ColorConstant(java.lang.String hexRGBString)
Creates a newColorConstantfor 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.- Parameters:
hexRGBString- The RGB values in hexadecimal format.- Since:
- 0.8
-
-
Method Detail
-
getRed
public int getRed()
Description copied from interface:IColorConstantReturns the amount of red in the color, from 0 to 255.- Specified by:
getRedin interfaceIColorConstant- Returns:
- the red component of the color
-
getGreen
public int getGreen()
Description copied from interface:IColorConstantReturns the amount of green in the color, from 0 to 255.- Specified by:
getGreenin interfaceIColorConstant- Returns:
- the green component of the color
-
getBlue
public int getBlue()
Description copied from interface:IColorConstantReturns the amount of blue in the color, from 0 to 255.- Specified by:
getBluein interfaceIColorConstant- Returns:
- the blue component of the color
-
-