Class ImageUtil

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

public final class ImageUtil extends 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.
  • Method Details

    • getInstance

      public static ImageUtil getInstance()
      Gets the singleton instance.
    • getImageDescriptorFromFile

      public ImageDescriptor getImageDescriptorFromFile(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:
      fullPath - the path
      Returns:
      an ImageDescriptor or null
    • getImageDescriptor

      public ImageDescriptor getImageDescriptor(String pluginId, 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(String pluginId, 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