Package org.eclipse.graphiti.ui.internal

## Class ResourceRegistry

- java.lang.Object
- - org.eclipse.graphiti.ui.internal.ResourceRegistry

All Implemented Interfaces:
  `IDisposable`, `IResourceRegistry`

    public class ResourceRegistry
    extends java.lang.Object
    implements IResourceRegistry

### Constructor Summary

Constructors
`ResourceRegistry()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `dispose()` Calls dispose() on all registered resources.
`org.eclipse.swt.graphics.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).
`org.eclipse.swt.graphics.Color` `getSwtColor​(java.lang.String hexRGBString)` Returns a SWT color for for a given String, which defines the RGB values in hexadecimal format.
`org.eclipse.swt.graphics.Font` `getSwtFont​(org.eclipse.swt.graphics.FontData fontData)` Provides an SWT font instance with the given font data.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ResourceRegistry

    public ResourceRegistry()

### Method Detail

#### getSwtColor

    public org.eclipse.swt.graphics.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).

If this this registry disposes, this returned color will also disposed.

Specified by:
  `getSwtColor` in interface `IResourceRegistry`
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
Returns:
  a SWT color
See Also:
  `Color`

#### dispose

    public void dispose()

Calls dispose() on all registered resources.

Specified by:
  `dispose` in interface `IDisposable`

#### getSwtColor

    public org.eclipse.swt.graphics.Color getSwtColor​(java.lang.String hexRGBString)

Returns a SWT color 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.

If this this registry disposes, this returned color will also disposed.

Specified by:
  `getSwtColor` in interface `IResourceRegistry`
Parameters:
  `hexRGBString` - The RGB values in hexadecimal format.
Returns:
  a SWT color
See Also:
  `Color`

#### getSwtFont

    public org.eclipse.swt.graphics.Font getSwtFont​(org.eclipse.swt.graphics.FontData fontData)

Provides an SWT font instance with the given font data.

Specified by:
  `getSwtFont` in interface `IResourceRegistry`
Parameters:
  `fontData` - the font data describing the desired font
Returns:
  an SWT font instance
See Also:
  `Font`