Class ImageProvider
- java.lang.Object
-
- net.ssehub.easy.producer.ui.productline_editor.ImageProvider
-
public class ImageProvider extends java.lang.ObjectAn image provider shielding the platform UI image source in case of RCP applications.- Author:
- Holger Eichelberger
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImageProvider.ImageTypeDefines the supported image types.
-
Field Summary
Fields Modifier and Type Field Description private static ImageProviderinstanceprivate java.util.Map<ImageProvider.ImageType,org.eclipse.swt.graphics.Image>map
-
Constructor Summary
Constructors Modifier Constructor Description protectedImageProvider()Creates an uninitialized image provider.protectedImageProvider(org.eclipse.ui.ISharedImages sharedImages)Creates an instance for asharedImagesobject.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.swt.graphics.ImagegetImage(ImageProvider.ImageType type)Returns the specified image.static ImageProvidergetInstance()Returns the image provider with lazy instantiation of thisImageProviderin case no other was specified before.protected voidsetImage(ImageProvider.ImageType type, org.eclipse.swt.graphics.Image image)Defines a specific image.static voidsetInstance(ImageProvider iProvider)Defines the recent image provider.
-
-
-
Field Detail
-
instance
private static ImageProvider instance
-
map
private java.util.Map<ImageProvider.ImageType,org.eclipse.swt.graphics.Image> map
-
-
Constructor Detail
-
ImageProvider
protected ImageProvider()
Creates an uninitialized image provider.
-
ImageProvider
protected ImageProvider(org.eclipse.ui.ISharedImages sharedImages)
Creates an instance for asharedImagesobject.- Parameters:
sharedImages- the shared images object to instantiated from
-
-
Method Detail
-
getInstance
public static ImageProvider getInstance()
Returns the image provider with lazy instantiation of thisImageProviderin 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 typeimage- the associated image
-
-