|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.tssap.util.ui.image.SapIdeUtilImages
This central utility class implements several methods that return either image descriptors or SWT images for direct display in the UI. You can access a method from this class whether you are using Workbench icons from the Eclipse standard, SAP standard icons, or your graphics from a specific plug-in.
In the SWT program model there is a difference between images (SWT images) and image descriptors
ImageDescriptor,
Image,
org.eclipse.jface.resource.ImageRegistry| Field Summary | |
static java.lang.String |
DEFAULT_ICONS_DIRECTORY
|
| Constructor Summary | |
SapIdeUtilImages()
|
|
| Method Summary | |
static org.eclipse.swt.graphics.Image |
createImageFromIconsDirectory(org.eclipse.core.runtime.IPluginDescriptor pluginDescriptor,
java.lang.String filePath)
This method returns an SWT image, if you specify a plug-in descriptor and the name of the graphic file you want. |
static org.eclipse.swt.graphics.Image |
createImageFromIconsDirectory(java.lang.String pluginId,
java.lang.String filePath)
|
static org.eclipse.jface.resource.ImageDescriptor |
getImageDescriptorFromIconsDirectory(org.eclipse.core.runtime.IPluginDescriptor pluginDescriptor,
java.lang.String filePath)
This method does basically the same as createImageFromIconsDirectory. |
static org.eclipse.jface.resource.ImageDescriptor |
getImageDescriptorFromIconsDirectory(java.lang.String pluginId,
java.lang.String filePath)
|
static org.eclipse.swt.graphics.Image |
getImageFromIconsDirectory(org.eclipse.core.runtime.IPluginDescriptor pluginDescriptor,
java.lang.String filePath)
This method does basically the same as createImageFromIconsDirectory. |
static org.eclipse.swt.graphics.Image |
getImageFromIconsDirectory(java.lang.String pluginId,
java.lang.String filePath)
|
static org.eclipse.swt.graphics.Image |
getSapImage(ISapImage sapImage)
This method returns an image instance of a standard SAP icon. |
static org.eclipse.jface.resource.ImageDescriptor |
getSapImageDescriptor(ISapImage sapImage)
This method does basically the same as getSapImage. |
static org.eclipse.swt.graphics.Image |
getWorkbenchImage(java.lang.String symbolicName)
This method returns an image instance of an Eclipse Workbench standard icon. |
static org.eclipse.jface.resource.ImageDescriptor |
getWorkbenchImageDescriptor(java.lang.String symbolicName)
This method returns an image descriptor of an Eclipse Workbench standard icon. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String DEFAULT_ICONS_DIRECTORY
| Constructor Detail |
public SapIdeUtilImages()
| Method Detail |
public static org.eclipse.jface.resource.ImageDescriptor getWorkbenchImageDescriptor(java.lang.String symbolicName)
symbolicName - symbolic name defined in IWorkbenchGraphicConstantsgetWorkbenchImage(String)public static org.eclipse.swt.graphics.Image getWorkbenchImage(java.lang.String symbolicName)
Example:
Image myImage = SapIdeUtilImages.getWorkbenchImage(ISapSharedImages.IMG_OBJ_FOLDER);
symbolicName - symbolic name defined in IWorkbenchGraphicConstantsorg.eclipse.ui.internal.IWorkbenchGraphicConstants
public static org.eclipse.swt.graphics.Image createImageFromIconsDirectory(org.eclipse.core.runtime.IPluginDescriptor pluginDescriptor,
java.lang.String filePath)
Exammple:
Image myImage = SapIdeUtilImages.createImageFromIconsDirectory(MyPlugin.getInstance().getDescriptor(),"xyz/my_icon.gif"));Note: The image has to be disposed afterwards !
pluginDescriptor - the descriptor of the pluginfilePath - path to image file (without /icons prefix which is added automatically).
public static org.eclipse.swt.graphics.Image createImageFromIconsDirectory(java.lang.String pluginId,
java.lang.String filePath)
Plugin descriptor is computed by using the given id.
public static org.eclipse.jface.resource.ImageDescriptor getImageDescriptorFromIconsDirectory(org.eclipse.core.runtime.IPluginDescriptor pluginDescriptor,
java.lang.String filePath)
pluginDescriptor - the descriptor of the pluginfilePath - path to image file (without /icons prefix which is added automatically).createImageFromIconsDirectory(IPluginDescriptor, String)
public static org.eclipse.jface.resource.ImageDescriptor getImageDescriptorFromIconsDirectory(java.lang.String pluginId,
java.lang.String filePath)
Plugin descriptor is computed by using the given id.
public static org.eclipse.swt.graphics.Image getImageFromIconsDirectory(org.eclipse.core.runtime.IPluginDescriptor pluginDescriptor,
java.lang.String filePath)
The difference is, that the created image is stored in the image registry!
pluginDescriptor - the descriptor of the pluginfilePath - path to image file (without /icons prefix which is added automatically).createImageFromIconsDirectory(IPluginDescriptor, String)
public static org.eclipse.swt.graphics.Image getImageFromIconsDirectory(java.lang.String pluginId,
java.lang.String filePath)
Plugin descriptor is computed by using the given id.public static org.eclipse.swt.graphics.Image getSapImage(ISapImage sapImage)
Example:
myToolbar.addToolBarButton(SapIdeUtilImages.getSapImage(SapImage.ICON_REFERENCE_LIST));
sapImage - symbolic constant of SapImage (defined in SapImage)SapImagepublic static org.eclipse.jface.resource.ImageDescriptor getSapImageDescriptor(ISapImage sapImage)
sapImage - symbolic constant of SapImage (defined in SapImage)SapImage,
SapIdeUtilImages#getSapImage(SapImage)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||