blob: b8667918c8f405453440411e13990363579bbfdc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
/*******************************************************************************
* Copyright (c) 2013 Soft-Maint.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Thomas Cicognani (Soft-Maint) - Bug 424416 - Plug-in for JFace Utilities
******************************************************************************/
package org.eclipse.papyrus.emf.facet.util.jface.ui.imageprovider;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.DecorationOverlayIcon;
import org.eclipse.swt.graphics.Image;
/**
* JFace Image Provider
*
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
* @since 0.4.0
*/
public interface IImageProvider {
/**
* Return an image from an Overlay Icon description.
*
* @param imgDescriptor
* Overlay Icon description
* @return A new image
*/
Image getImage(DecorationOverlayIcon imgDescriptor);
/**
* Return an image from its path
*
* @param path
* The path of the image
* @return A new image
*/
Image getImage(String path);
/**
* Return an image descriptor from its path
*
* @param resourcePath
* The path from which to create the descriptor
* @return The new image descriptor
*/
ImageDescriptor createImageDescriptor(String resourcePath);
/**
* Return an image from an image descriptor
*
* @param imgDescriptor
* An image descriptor to create the image
* @return A new image
*/
Image getImage(ImageDescriptor imgDescriptor);
}
|