public class ResourceRegistry extends java.lang.Object implements IResourceRegistry
Constructor and Description |
---|
ResourceRegistry() |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Calls dispose() on all registered resources.
|
Color |
getSwtColor(int red,
int green,
int blue)
Returns a SWT color for the given red, green and blue values expressed as
ints in the range 0 to 255 (where 0 is black and 255 is full brightness).
|
Color |
getSwtColor(java.lang.String hexRGBString)
Returns a SWT color for for a given String, which defines the RGB values
in hexadecimal format.
|
Font |
getSwtFont(FontData fontData)
Provides an SWT font instance with the given font data.
|
public Color getSwtColor(int red, int green, int blue)
If this this registry disposes, this returned color will also disposed.
getSwtColor
in interface IResourceRegistry
red
- the amount of red in the colorgreen
- the amount of green in the colorblue
- the amount of blue in the colorColor
public void dispose()
dispose
in interface IDisposable
public Color getSwtColor(java.lang.String hexRGBString)
getColor("FF0000")
returns a red
color.
If this this registry disposes, this returned color will also disposed.
getSwtColor
in interface IResourceRegistry
hexRGBString
- The RGB values in hexadecimal format.Color
public Font getSwtFont(FontData fontData)
getSwtFont
in interface IResourceRegistry
fontData
- the font data describing the desired fontFont