org.eclipse.graphiti.ui.services
Interface IImageService


public interface IImageService

This interface provides services for the creation of images.


Method Summary
 ImageDescriptor getImageDescriptorForId(String diagramTypeProviderId, String imageId)
          Gets an image descriptor for the given image id.
 Image getImageForId(String diagramTypeProviderId, String imageId)
          Gets an image for the given image id.
 ImageDescriptor getPlatformImageDescriptorForId(String imageId)
          Gets an image descriptor for the given image id.
 Image getPlatformImageForId(String imageId)
          Gets an image for the given image id.
 void removeImageFromRegistry(String imageId)
          Removes the corresponding image entry from the image registry and disposes the corresponding image (if existent).
 

Method Detail

getImageDescriptorForId

ImageDescriptor getImageDescriptorForId(String diagramTypeProviderId,
                                        String imageId)
Gets an image descriptor for the given image id. This image id must be supported by an graphiti image provider, and available to the given DiagramTypeProvider. The image registry of the plugin org.eclipse.graphiti.ui is used. This ensures that the image descriptor will only created once.

Parameters:
imageId - the image id which is supported by an graphiti image provider
diagramTypeProviderId -
Returns:
the image descriptor for the id
Since:
0.10
See Also:
org.eclipse.jface.resource.ImageDescriptor

getImageForId

Image getImageForId(String diagramTypeProviderId,
                    String imageId)
Gets an image for the given image id. This image id must be supported by an graphiti image provider, and available to the given DiagramTypeProvider. The image registry of the plugin org.eclipse.graphiti.ui is used. This ensures that the image will only created once. The image returned must not be disposed by the caller.

Parameters:
imageId - the image id which is supported by an graphiti image provider
Returns:
the image for the id
Since:
0.10
See Also:
org.eclipse.swt.graphics.Image

removeImageFromRegistry

void removeImageFromRegistry(String imageId)
Removes the corresponding image entry from the image registry and disposes the corresponding image (if existent). The passed image id must be supported by an graphiti image provider. The image registry of the plugin org.eclipse.graphiti.ui is used. Only call this method if you can guarantee that the image/image descriptor is no longer in use.

Parameters:
imageId - the image id which is supported by an graphiti image provider
Since:
0.9
See Also:
org.eclipse.swt.graphics.Image

getPlatformImageDescriptorForId

ImageDescriptor getPlatformImageDescriptorForId(String imageId)
Gets an image descriptor for the given image id. This image id must be supported by the graphiti platform image provider. The image registry of the plugin org.eclipse.graphiti.ui is used. This ensures that the image descriptor will only created once.

Parameters:
imageId - the image id which is supported by the graphiti platform image provider
Returns:
the image descriptor for the id
Since:
0.10
See Also:
org.eclipse.jface.resource.ImageDescriptor

getPlatformImageForId

Image getPlatformImageForId(String imageId)
Gets an image for the given image id. This image id must be supported by the graphiti platform image provider. The image registry of the plugin org.eclipse.graphiti.ui is used. This ensures that the image will only created once. The image returned must not be disposed by the caller.

Parameters:
imageId - the image id which is supported by the graphiti platform image provider
Returns:
the image for the id
Since:
0.10
See Also:
org.eclipse.swt.graphics.Image


Copyright (c) SAP AG 2005, 2012.