org.eclipse.graphiti.util
Class ColorConstant

java.lang.Object
  extended by org.eclipse.graphiti.util.ColorConstant
All Implemented Interfaces:
IColorConstant

public class ColorConstant
extends java.lang.Object
implements IColorConstant

The Class ColorConstant.


Field Summary
private  int blue
           
private  int green
           
private  int red
           
 
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
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.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

red

private int red

green

private int green

blue

private int blue
Constructor Detail

ColorConstant

public 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).

Parameters:
red - the amount of red in the color
green - the amount of green in the color
blue - the amount of blue in the color

ColorConstant

public ColorConstant(java.lang.String hexRGBString)
Creates a new 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.

Parameters:
hexRGBString - The RGB values in hexadecimal format.
Since:
0.8
Method Detail

getRed

public int getRed()
Description copied from interface: IColorConstant
Returns the amount of red in the color, from 0 to 255.

Specified by:
getRed in interface IColorConstant
Returns:
the red component of the color

getGreen

public int getGreen()
Description copied from interface: IColorConstant
Returns the amount of green in the color, from 0 to 255.

Specified by:
getGreen in interface IColorConstant
Returns:
the green component of the color

getBlue

public int getBlue()
Description copied from interface: IColorConstant
Returns the amount of blue in the color, from 0 to 255.

Specified by:
getBlue in interface IColorConstant
Returns:
the blue component of the color


Copyright (c) SAP AG 2005, 2012.