Java Code Examples for org.eclipse.jface.resource.ImageDescriptor#createFromFile()

The following examples show how to use org.eclipse.jface.resource.ImageDescriptor#createFromFile() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
private ImageDescriptor makeDescriptor ( final String icon )
{
    if ( "info".equalsIgnoreCase ( icon ) )
    {
        return ImageDescriptor.createFromFile ( SystemMessageExtension.class, "icons/information.png" );
    }
    else if ( "warning".equalsIgnoreCase ( icon ) )
    {
        return ImageDescriptor.createFromFile ( SystemMessageExtension.class, "icons/exclamation.png" );
    }

    return ImageDescriptor.getMissingImageDescriptor ();
}
 
Example 2
Source Project: neoscada   File: RemoveAction.java    License: Eclipse Public License 1.0 4 votes vote down vote up
public RemoveAction ( final RealtimeListAdapter view )
{
    super ( Messages.RemoveAction_Name, ImageDescriptor.createFromFile ( RemoveAction.class, "icons/delete_obj.gif" ) );

    this.view = view;
}
 
Example 3
Source Project: scava   File: ResourceManager.java    License: Eclipse Public License 2.0 2 votes vote down vote up
/**
 * Returns an {@link ImageDescriptor} stored in the file at the specified path relative to the specified
 * class.
 * 
 * @param clazz
 *            the {@link Class} relative to which to find the image descriptor.
 * @param path
 *            the path to the image file.
 * @return the {@link ImageDescriptor} stored in the file at the specified path.
 */
public static ImageDescriptor getImageDescriptor(Class<?> clazz, String path) {
	return ImageDescriptor.createFromFile(clazz, path);
}
 
Example 4
/**
 * Returns an {@link ImageDescriptor} stored in the file at the specified path relative to the specified
 * class.
 * 
 * @param clazz
 *            the {@link Class} relative to which to find the image descriptor.
 * @param path
 *            the path to the image file.
 * @return the {@link ImageDescriptor} stored in the file at the specified path.
 */
public static ImageDescriptor getImageDescriptor(Class<?> clazz, String path) {
	return ImageDescriptor.createFromFile(clazz, path);
}
 
Example 5
/**
 * Returns an {@link ImageDescriptor} stored in the file at the specified
 * path relative to the specified
 * class.
 * 
 * @param clazz
 *            the {@link Class} relative to which to find the image
 *            descriptor.
 * @param path
 *            the path to the image file.
 * @return the {@link ImageDescriptor} stored in the file at the specified
 *         path.
 */
public static ImageDescriptor getImageDescriptor(Class<?> clazz, String path) {
	return ImageDescriptor.createFromFile(clazz, path);
}
 
Example 6
/**
 * Returns an {@link ImageDescriptor} stored in the file at the specified path relative to the specified
 * class.
 * 
 * @param clazz
 *            the {@link Class} relative to which to find the image descriptor.
 * @param path
 *            the path to the image file.
 * @return the {@link ImageDescriptor} stored in the file at the specified path.
 */
public static ImageDescriptor getImageDescriptor(Class<?> clazz, String path) {
	return ImageDescriptor.createFromFile(clazz, path);
}