# Class SWTResourcesRegistry

java.lang.Object
org.eclipse.e4.ui.css.core.resources.AbstractResourcesRegistry
org.eclipse.e4.ui.css.swt.resources.SWTResourcesRegistry

All Implemented Interfaces:
  `IResourcesRegistry`

public class SWTResourcesRegistry extends AbstractResourcesRegistry
SWT Resources Registry to cache SWT Resource like Color, Cursor and Font and dispose it.

## Constructor Summary

Constructors
Constructor
Description
`SWTResourcesRegistry(Display display)`

## Method Summary

Modifier and Type
Method
Description
`void`
`disposeResource(Object type, Object key, Object resource)`
`Object`
`getResource(Object type, Object key)`
Return resource type of `type` stored into cache with `key`.
`protected boolean`
`isDisposed(Object resource)`
`void`
`registerResource(Object type, Object key, Object resource)`
Register into cache the resource `resource` type of `type` with key `key`.
`List<Object>`
`removeResourcesByKeyTypeAndType(Class<?> keyType, Class<?>... types)`

### Methods inherited from class AbstractResourcesRegistry

`dispose, getCacheByType, getResourceType, unregisterResource, unregisterResource`

### Methods inherited from class Object

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

## Constructor Details

### SWTResourcesRegistry

public SWTResourcesRegistry(Display display)

## Method Details

### getResource

public Object getResource(Object type, Object key)
Description copied from interface: `IResourcesRegistry`
Return resource type of `type` stored into cache with `key`.

Specified by:
  `getResource` in interface `IResourcesRegistry`
Overrides:
  `getResource` in class `AbstractResourcesRegistry`
Parameters:
  `type` - Resource type like Font, Color, Cursor, Image

### registerResource

public void registerResource(Object type, Object key, Object resource)
Description copied from interface: `IResourcesRegistry`
Register into cache the resource `resource` type of `type` with key `key`.

Specified by:
  `registerResource` in interface `IResourcesRegistry`
Overrides:
  `registerResource` in class `AbstractResourcesRegistry`
Parameters:
  `type` - Resource type like Font, Color, Cursor, Image

### disposeResource

public void disposeResource(Object type, Object key, Object resource)

Specified by:
  `disposeResource` in class `AbstractResourcesRegistry`

### isDisposed

protected boolean isDisposed(Object resource)

### removeResourcesByKeyTypeAndType

public List<Object> removeResourcesByKeyTypeAndType(Class<?> keyType, Class<?>... types)