|
Elexis API documentationVersion 2.1.6 as of December 11 2011 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.swtdesigner.SWTResourceManager
com.swtdesigner.ResourceManager
public class ResourceManager
Utility class for managing OS resources associated with SWT/JFace controls such as colors, fonts, images,
etc.
!!! IMPORTANT !!! Application code must explicitly invoke the 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.
| Nested Class Summary | |
|---|---|
static interface |
ResourceManager.PluginResourceProvider
Provider for plugin resources, used by WindowBuilder at design time. |
| Field Summary |
|---|
| Fields inherited from class com.swtdesigner.SWTResourceManager |
|---|
BOTTOM_LEFT, BOTTOM_RIGHT, TOP_LEFT, TOP_RIGHT |
| Constructor Summary | |
|---|---|
ResourceManager()
|
|
| Method Summary | |
|---|---|
static Image |
decorateImage(Image baseImage,
Image decorator)
Returns an Image composed of a base image decorated by another image. |
static Image |
decorateImage(Image baseImage,
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 Image |
getImage(ImageDescriptor descriptor)
Returns an Image based on the specified ImageDescriptor. |
static ImageDescriptor |
getImageDescriptor(java.lang.Class<?> clazz,
java.lang.String path)
Returns an ImageDescriptor stored in the file at the specified path relative to the specified
class. |
static ImageDescriptor |
getImageDescriptor(java.lang.String path)
Returns an ImageDescriptor stored in the file at the specified path. |
static Image |
getPluginImage(java.lang.Object plugin,
java.lang.String name)
Deprecated. Use getPluginImage(String, String) instead. |
static Image |
getPluginImage(java.lang.String symbolicName,
java.lang.String path)
Returns an Image based on a Bundle and resource entry path. |
static ImageDescriptor |
getPluginImageDescriptor(java.lang.Object plugin,
java.lang.String name)
Deprecated. Use getPluginImageDescriptor(String, String) instead. |
static ImageDescriptor |
getPluginImageDescriptor(java.lang.String symbolicName,
java.lang.String path)
Returns an ImageDescriptor based on a Bundle and resource entry path. |
| Methods inherited from class com.swtdesigner.SWTResourceManager |
|---|
disposeColors, disposeCursors, disposeFonts, getBoldFont, getColor, getColor, getColor, getCursor, getFont, getFont, getImage, getImage |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResourceManager()
| Method Detail |
|---|
public static ImageDescriptor getImageDescriptor(java.lang.Class<?> clazz,
java.lang.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 ImageDescriptor getImageDescriptor(java.lang.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 Image getImage(ImageDescriptor descriptor)
Image based on the specified ImageDescriptor.
descriptor - the ImageDescriptor for the Image.
Image based on the specified ImageDescriptor.
public static Image decorateImage(Image baseImage,
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 Image decorateImage(Image baseImage,
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 Image getPluginImage(java.lang.Object plugin,
java.lang.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 plugin
Image stored in the file at the specified path
public static Image getPluginImage(java.lang.String symbolicName,
java.lang.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 ImageDescriptor getPluginImageDescriptor(java.lang.Object plugin,
java.lang.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 ImageDescriptor getPluginImageDescriptor(java.lang.String symbolicName,
java.lang.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()
|
Elexis API documentationVersion 2.1.6 as of December 11 2011 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||