public class ColorFontUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static org.eclipse.swt.graphics.RGB |
BLACK
the color of black
|
static org.eclipse.swt.graphics.RGB |
BLUE
the color of blue
|
static org.eclipse.swt.graphics.RGB |
CYAN
the color of cyan
|
static org.eclipse.swt.graphics.RGB |
DARK_GRAY
the color of dark gray
|
static org.eclipse.swt.graphics.RGB |
GRAY
the color of gray
|
static org.eclipse.swt.graphics.RGB |
GREEN
the color of green
|
static org.eclipse.swt.graphics.RGB |
LIGHT_BLUE
the color of light blue
|
static org.eclipse.swt.graphics.RGB |
ORANGE
the color of orange
|
static org.eclipse.swt.graphics.RGB |
PINK
the color of pink
|
static org.eclipse.swt.graphics.RGB |
PURPLE
the color of orange
|
static org.eclipse.swt.graphics.RGB |
RED
the color of red
|
static org.eclipse.swt.graphics.RGB |
WHITE
the color of white
|
static org.eclipse.swt.graphics.RGB |
YELLOW
the color of yellow
|
Constructor and Description |
---|
ColorFontUtil() |
Modifier and Type | Method and Description |
---|---|
static org.eclipse.swt.graphics.RGB |
getColorFromHSB(float hue,
float saturation,
float brightness)
Get a color with the given
hue, saturation, and brightness.
|
static org.eclipse.swt.graphics.RGB |
getColorFromRGB(int red,
int green,
int blue)
Get a color with the given
red, green and blue values.
|
static org.eclipse.swt.graphics.FontData |
getFont(java.lang.String name,
int height,
int style)
Get a new font data given a font name,
the height of the desired font in points,
and a font style.
|
public static final org.eclipse.swt.graphics.RGB BLACK
public static final org.eclipse.swt.graphics.RGB BLUE
public static final org.eclipse.swt.graphics.RGB CYAN
public static final org.eclipse.swt.graphics.RGB DARK_GRAY
public static final org.eclipse.swt.graphics.RGB GRAY
public static final org.eclipse.swt.graphics.RGB GREEN
public static final org.eclipse.swt.graphics.RGB LIGHT_BLUE
public static final org.eclipse.swt.graphics.RGB ORANGE
public static final org.eclipse.swt.graphics.RGB PINK
public static final org.eclipse.swt.graphics.RGB PURPLE
public static final org.eclipse.swt.graphics.RGB RED
public static final org.eclipse.swt.graphics.RGB WHITE
public static final org.eclipse.swt.graphics.RGB YELLOW
public static final org.eclipse.swt.graphics.RGB getColorFromRGB(int red, int green, int blue)
red
- the red component of the new instancegreen
- the green component of the new instanceblue
- the blue component of the new instancejava.lang.IllegalArgumentException
- public static final org.eclipse.swt.graphics.RGB getColorFromHSB(float hue, float saturation, float brightness)
hue
- the hue value for the HSB color (from 0 to 360)saturation
- the saturation value for the HSB color (from 0 to 1)brightness
- the brightness value for the HSB color (from 0 to 1)java.lang.IllegalArgumentException
- public static final org.eclipse.swt.graphics.FontData getFont(java.lang.String name, int height, int style)
name
- the name of the font (must not be null)height
- the font height in pointsstyle
- A bitwise combination of NORMAL(0), BOLD(1) and ITALIC(2).java.lang.IllegalArgumentException
-