Class ImageProvider
- java.lang.Object
-
- net.ssehub.easy.producer.ui.productline_editor.instantiator.ImageProvider
-
public class ImageProvider extends java.lang.ObjectProvidesImages for theInstantiatorConfigPage.- Author:
- kroeher
-
-
Field Summary
Fields Modifier and Type Field Description private org.eclipse.swt.graphics.DevicedisplayDevicestatic ImageProviderINSTANCEprivate static java.lang.StringVIL_ICONS_DIR
-
Constructor Summary
Constructors Modifier Constructor Description privateImageProvider()Constructs the singleton object of thisImageProvider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.swt.graphics.ImagegetImage(TreeNode node)Retrieves the correspondingImagefor the givenTreeNodeand returns that image.private java.lang.StringgetImagePath(TreeNode node)Returns the path to the image resource that corresponds to the actual type of the givenTreeNode.
-
-
-
Field Detail
-
INSTANCE
public static final ImageProvider INSTANCE
-
VIL_ICONS_DIR
private static final java.lang.String VIL_ICONS_DIR
- See Also:
- Constant Field Values
-
displayDevice
private org.eclipse.swt.graphics.Device displayDevice
-
-
Constructor Detail
-
ImageProvider
private ImageProvider()
Constructs the singleton object of thisImageProvider.
-
-
Method Detail
-
getImage
public org.eclipse.swt.graphics.Image getImage(TreeNode node)
Retrieves the correspondingImagefor the givenTreeNodeand returns that image.
-
getImagePath
private java.lang.String getImagePath(TreeNode node)
Returns the path to the image resource that corresponds to the actual type of the givenTreeNode.- Parameters:
node- theTreeNodefor which the path to the image resource should be returned. Should never benull.- Returns:
- the path to the image resource as a
String. May returnnullif the type of the givennodeis unknown.
-
-