org.csstudio.ui.util
Class ImageUtil

java.lang.Object
  extended by org.csstudio.ui.util.ImageUtil

public final class ImageUtil
extends java.lang.Object

Utility class, which provides access to images. Images returned by this utility are managed by a ImageRegistry and must not explicitly be disposed, when they are not used anymore.

Author:
Sven Wende
See Also:
ImageRegistry}

Method Summary
 Image getImage(java.lang.String pluginId, java.lang.String path)
          Gets an Image for an image resource which is supposed to reside in the plugin with the specified pluginId under the specified path.
 ImageDescriptor getImageDescriptor(java.lang.String pluginId, java.lang.String path)
          Gets an ImageDescriptor for an image resource which is supposed to reside in the plugin with the specified pluginId under the specified path.
 ImageDescriptor getImageDescriptorFromFile(java.lang.String fullPath)
          Gets an ImageDescriptor for an image resource which is supposed to reside in the plugin with the specified pluginId under the specified path.
static ImageUtil getInstance()
          Gets the singleton instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ImageUtil getInstance()
Gets the singleton instance.

Returns:
the singleton instance

getImageDescriptorFromFile

public ImageDescriptor getImageDescriptorFromFile(java.lang.String fullPath)
Gets an ImageDescriptor for an image resource which is supposed to reside in the plugin with the specified pluginId under the specified path.

Parameters:
pluginId - the ID of the plugin that contains the image resource
fullPath - the path
Returns:
an ImageDescriptor or null

getImageDescriptor

public ImageDescriptor getImageDescriptor(java.lang.String pluginId,
                                          java.lang.String path)
Gets an ImageDescriptor for an image resource which is supposed to reside in the plugin with the specified pluginId under the specified path.

Parameters:
pluginId - the ID of the plugin that contains the image resource
path - the path
Returns:
an ImageDescriptor or null

getImage

public Image getImage(java.lang.String pluginId,
                      java.lang.String path)
Gets an Image for an image resource which is supposed to reside in the plugin with the specified pluginId under the specified path.

Parameters:
pluginId - the ID of the plugin that contains the image resource
path - the path
Returns:
an Image or null