Class ImageProvider


  • public class ImageProvider
    extends java.lang.Object
    Provides Images for the InstantiatorConfigPage.
    Author:
    kroeher
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ImageProvider()
      Constructs the singleton object of this ImageProvider.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.eclipse.swt.graphics.Image getImage​(TreeNode node)
      Retrieves the corresponding Image for the given TreeNode and returns that image.
      private java.lang.String getImagePath​(TreeNode node)
      Returns the path to the image resource that corresponds to the actual type of the given TreeNode.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • displayDevice

        private org.eclipse.swt.graphics.Device displayDevice
    • Constructor Detail

      • ImageProvider

        private ImageProvider()
        Constructs the singleton object of this ImageProvider.
    • Method Detail

      • getImage

        public org.eclipse.swt.graphics.Image getImage​(TreeNode node)
        Retrieves the corresponding Image for the given TreeNode and returns that image.
        Parameters:
        node - the TreeNode for which an Image should be returned.
        Returns:
        the the corresponding Image for the given TreeNode. May return null if the given node is null or the Device was not set before.
      • getImagePath

        private java.lang.String getImagePath​(TreeNode node)
        Returns the path to the image resource that corresponds to the actual type of the given TreeNode.
        Parameters:
        node - the TreeNode for which the path to the image resource should be returned. Should never be null.
        Returns:
        the path to the image resource as a String. May return null if the type of the given node is unknown.