Class ImageProvider


  • public class ImageProvider
    extends java.lang.Object
    An image provider shielding the platform UI image source in case of RCP applications.
    Author:
    Holger Eichelberger
    • Constructor Detail

      • ImageProvider

        protected ImageProvider()
        Creates an uninitialized image provider.
      • ImageProvider

        protected ImageProvider​(org.eclipse.ui.ISharedImages sharedImages)
        Creates an instance for a sharedImages object.
        Parameters:
        sharedImages - the shared images object to instantiated from
    • Method Detail

      • getInstance

        public static ImageProvider getInstance()
        Returns the image provider with lazy instantiation of this ImageProvider in case no other was specified before.
        Returns:
        the image provider
      • getImage

        public org.eclipse.swt.graphics.Image getImage​(ImageProvider.ImageType type)
        Returns the specified image.
        Parameters:
        type - the image type to return
        Returns:
        the image
      • setInstance

        public static void setInstance​(ImageProvider iProvider)
        Defines the recent image provider.
        Parameters:
        iProvider - the new image provider
      • setImage

        protected void setImage​(ImageProvider.ImageType type,
                                org.eclipse.swt.graphics.Image image)
        Defines a specific image.
        Parameters:
        type - the type
        image - the associated image