Package com.iizigo

Class ImageRegistry

java.lang.Object
com.iizigo.ImageRegistry

public class ImageRegistry extends Object
The Image Registry holds information about Image Descriptors and Image instances.
Author:
Christopher Mindus
  • Field Details

  • Method Details

    • getInstance

      public static ImageRegistry getInstance()
      Gets the Image Registry.
      Returns:
      The ImageRegistry singleton.
    • register

      public void register(Class<? extends GProp<?>> propertyClass, String fileName)
      Registers images for property classes.
      Parameters:
      propertyClass - The property class.
      fileName - The file name of the image, relative the "icons" folder.
    • register

      public void register(Class<? extends GProp<?>> propertyClass, ImageDescriptor descriptor)
      Registers images for property classes.
      Parameters:
      propertyClass - The property class.
      descriptor - The image descriptor.
    • get

      public ImageDescriptor get(Class<? extends GProp<?>> propertyClass)
      Gets an Image Descriptor image for a property class.
      Parameters:
      propertyClass - The property class.
      Returns:
      The Image Descriptor or null for none.
    • get

      public ImageDescriptor get(String fileName)
      Gets an icon Image Descriptor from the iiziGo Plugin's "icons" folder.
      Parameters:
      fileName - A file name (or relative path to file).
      Returns:
      The Image Descriptor.
    • get

      public ImageDescriptor get(String pluginID, String fileName)
      Gets an icon Image Descriptor from the "icons" folder of the specified.
      Parameters:
      pluginID - The plugin ID for where to retrieve the icon ImageDescriptor.
      fileName - A file name (or relative path to file).
      Returns:
      The Image Descriptor.
    • getWorkbenchShared

      public ImageDescriptor getWorkbenchShared(String name)
      Loads a workbench Image from its symbolic name defined in org.eclipse.ui.ISharedImages.
      Parameters:
      name - The name.
      Returns:
      The Image Descriptor or null if not found.
    • remove

      public boolean remove(ImageDescriptor descriptor)
      Removes an image descriptor from the map of loaded ones.
      Parameters:
      descriptor - The image descriptor.
      Returns:
      true for removed, false if not removed.