public class ResourceManager extends SWTResourceManager
dispose() method to release the operating
system resources managed by cached objects when those objects and OS resources are no longer needed (e.g. on
application shutdown) This class may be freely distributed as part of any application or plugin.
| Modifier and Type | Class and Description |
|---|---|
static interface |
ResourceManager.PluginResourceProvider
Provider for plugin resources, used by WindowBuilder at design time.
|
BOTTOM_LEFT, BOTTOM_RIGHT, LAST_CORNER_KEY, TOP_LEFT, TOP_RIGHT| Constructor and Description |
|---|
ResourceManager() |
| Modifier and Type | Method and Description |
|---|---|
static org.eclipse.swt.graphics.Image |
decorateImage(org.eclipse.swt.graphics.Image baseImage,
org.eclipse.swt.graphics.Image decorator)
Returns an
Image composed of a base image decorated by another image. |
static org.eclipse.swt.graphics.Image |
decorateImage(org.eclipse.swt.graphics.Image baseImage,
org.eclipse.swt.graphics.Image decorator,
int corner)
Returns an
Image composed of a base image decorated by another image. |
static void |
dispose()
Dispose of cached objects and their underlying OS resources.
|
static void |
disposeImages()
Dispose all of the cached images.
|
static org.eclipse.swt.graphics.Image |
getImage(org.eclipse.jface.resource.ImageDescriptor descriptor)
Returns an
Image based on the specified ImageDescriptor. |
static org.eclipse.jface.resource.ImageDescriptor |
getImageDescriptor(Class<?> clazz,
String path)
Returns an
ImageDescriptor stored in the file at the specified path relative to the specified class. |
static org.eclipse.jface.resource.ImageDescriptor |
getImageDescriptor(String path)
Returns an
ImageDescriptor stored in the file at the specified path. |
static org.eclipse.swt.graphics.Image |
getPluginImage(Object plugin,
String name)
Deprecated.
Use
getPluginImage(String, String) instead. |
static org.eclipse.swt.graphics.Image |
getPluginImage(String symbolicName,
String path)
Returns an
Image based on a Bundle and resource entry path. |
static org.eclipse.jface.resource.ImageDescriptor |
getPluginImageDescriptor(Object plugin,
String name)
Deprecated.
Use
getPluginImageDescriptor(String, String) instead. |
static org.eclipse.jface.resource.ImageDescriptor |
getPluginImageDescriptor(String symbolicName,
String path)
Returns an
ImageDescriptor based on a Bundle and resource entry path. |
disposeColors, disposeCursors, disposeFonts, getBoldFont, getColor, getColor, getColor, getCursor, getFont, getFont, getImage, getImage, getImagepublic static org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(Class<?> clazz, String path)
ImageDescriptor stored in the file at the specified path relative to the specified class.clazz - the Class relative to which to find the image descriptor.path - the path to the image file.ImageDescriptor stored in the file at the specified path.public static org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(String path)
ImageDescriptor stored in the file at the specified path.path - the path to the image file.ImageDescriptor stored in the file at the specified path.public static org.eclipse.swt.graphics.Image getImage(org.eclipse.jface.resource.ImageDescriptor descriptor)
Image based on the specified ImageDescriptor.descriptor - the ImageDescriptor for the Image.Image based on the specified ImageDescriptor.public static org.eclipse.swt.graphics.Image decorateImage(org.eclipse.swt.graphics.Image baseImage,
org.eclipse.swt.graphics.Image decorator)
Image composed of a base image decorated by another image.baseImage - the base Image that should be decorated.decorator - the Image to decorate the base image.Image The resulting decorated image.public static org.eclipse.swt.graphics.Image decorateImage(org.eclipse.swt.graphics.Image baseImage,
org.eclipse.swt.graphics.Image decorator,
int corner)
Image composed of a base image decorated by another image.baseImage - the base Image that should be decorated.decorator - the Image to decorate the base image.corner - the corner to place decorator image.Image.public static void disposeImages()
@Deprecated public static org.eclipse.swt.graphics.Image getPluginImage(Object plugin, String name)
getPluginImage(String, String) instead.Image based on a plugin and file path.plugin - the plugin Object containing the imagename - the path to the image within the pluginImage stored in the file at the specified pathpublic static org.eclipse.swt.graphics.Image getPluginImage(String symbolicName, String path)
Image based on a Bundle and resource entry path.symbolicName - the symbolic name of the Bundle.path - the path of the resource entry.Image stored in the file at the specified path.@Deprecated public static org.eclipse.jface.resource.ImageDescriptor getPluginImageDescriptor(Object plugin, String name)
getPluginImageDescriptor(String, String) instead.ImageDescriptor based on a plugin and file path.plugin - the plugin Object containing the image.name - the path to th eimage within the plugin.ImageDescriptor stored in the file at the specified path.public static org.eclipse.jface.resource.ImageDescriptor getPluginImageDescriptor(String symbolicName, String path)
ImageDescriptor based on a Bundle and resource entry path.symbolicName - the symbolic name of the Bundle.path - the path of the resource entry.ImageDescriptor based on a Bundle and resource entry path.public static void dispose()
Copyright © 2016. All rights reserved.