Search in sources :

Example 26 with ImageRegistry

use of org.eclipse.jface.resource.ImageRegistry in project webtools.servertools by eclipse.

the class ImageResource method initializeImageRegistry.

/**
 * Initialize the image resources.
 */
protected static void initializeImageRegistry() {
    imageRegistry = new ImageRegistry();
    imageDescriptors = new HashMap<String, ImageDescriptor>();
    registerImage(IMG_WIZ_RUNTIME_TYPE, URL_WIZBAN + "new_runtime_wiz.png");
}
Also used : ImageRegistry(org.eclipse.jface.resource.ImageRegistry) ImageDescriptor(org.eclipse.jface.resource.ImageDescriptor)

Example 27 with ImageRegistry

use of org.eclipse.jface.resource.ImageRegistry in project epp.mpc by eclipse.

the class MarketplaceClientUiPlugin method createImageRegistry.

@Override
protected ImageRegistry createImageRegistry() {
    ImageRegistry imageRegistry = super.createImageRegistry();
    imageRegistry.put(NO_ICON_PROVIDED, imageDescriptorFromPlugin(getBundle().getSymbolicName(), // $NON-NLS-1$
    "icons/noiconprovided.png"));
    imageRegistry.put(NO_ICON_PROVIDED_CATALOG, // $NON-NLS-1$
    imageDescriptorFromPlugin(getBundle().getSymbolicName(), "icons/noiconprovided32.png"));
    imageRegistry.put(DEFAULT_MARKETPLACE_ICON, // $NON-NLS-1$
    imageDescriptorFromPlugin(getBundle().getSymbolicName(), "icons/marketplace_banner.png"));
    // $NON-NLS-1$
    imageRegistry.put(IU_ICON, imageDescriptorFromPlugin(getBundle().getSymbolicName(), "icons/iu_obj.gif"));
    imageRegistry.put(IU_ICON_UPDATE, imageDescriptorFromPlugin(getBundle().getSymbolicName(), // $NON-NLS-1$
    "icons/iu_update_obj.gif"));
    imageRegistry.put(IU_ICON_INSTALL, // $NON-NLS-1$
    imageDescriptorFromPlugin(getBundle().getSymbolicName(), "icons/iu_install_obj.gif"));
    imageRegistry.put(IU_ICON_UNINSTALL, // $NON-NLS-1$
    imageDescriptorFromPlugin(getBundle().getSymbolicName(), "icons/iu_uninstall_obj.gif"));
    imageRegistry.put(IU_ICON_DISABLED, // $NON-NLS-1$
    imageDescriptorFromPlugin(getBundle().getSymbolicName(), "icons/iu_disabled_obj.gif"));
    {
        ImageDescriptor errorOverlay = PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_DEC_FIELD_ERROR);
        Image iuImage = imageRegistry.get(IU_ICON);
        DecorationOverlayIcon iuErrorIcon = new DecorationOverlayIcon(iuImage, errorOverlay, IDecoration.BOTTOM_RIGHT);
        imageRegistry.put(IU_ICON_ERROR, iuErrorIcon);
    }
    imageRegistry.put(NEWS_ICON_UPDATE, // $NON-NLS-1$
    imageDescriptorFromPlugin(getBundle().getSymbolicName(), "icons/news_update.gif"));
    // $NON-NLS-1$
    imageRegistry.put(ITEM_ICON_STAR, imageDescriptorFromPlugin(getBundle().getSymbolicName(), "icons/star.png"));
    imageRegistry.put(ITEM_ICON_STAR_SELECTED, // $NON-NLS-1$
    imageDescriptorFromPlugin(getBundle().getSymbolicName(), "icons/star-selected.png"));
    // $NON-NLS-1$
    imageRegistry.put(ITEM_ICON_SHARE, imageDescriptorFromPlugin(getBundle().getSymbolicName(), "icons/share.png"));
    imageRegistry.put(ACTION_ICON_FAVORITES, // $NON-NLS-1$
    imageDescriptorFromPlugin(getBundle().getSymbolicName(), "icons/action-item-favorites.png"));
    imageRegistry.put(ACTION_ICON_LOGIN, // $NON-NLS-1$
    imageDescriptorFromPlugin(getBundle().getSymbolicName(), "icons/action-item-login.png"));
    imageRegistry.put(ACTION_ICON_WARNING, // $NON-NLS-1$
    imageDescriptorFromPlugin(getBundle().getSymbolicName(), "icons/action-item-warning.png"));
    imageRegistry.put(FAVORITES_LIST_ICON, // $NON-NLS-1$
    imageDescriptorFromPlugin(getBundle().getSymbolicName(), "icons/favorites-list.png"));
    return imageRegistry;
}
Also used : DecorationOverlayIcon(org.eclipse.jface.viewers.DecorationOverlayIcon) ImageRegistry(org.eclipse.jface.resource.ImageRegistry) ImageDescriptor(org.eclipse.jface.resource.ImageDescriptor) Image(org.eclipse.swt.graphics.Image)

Example 28 with ImageRegistry

use of org.eclipse.jface.resource.ImageRegistry in project webtools.servertools by eclipse.

the class ImageResource method initializeImageRegistry.

/**
 * Initialize the image resources.
 */
protected static void initializeImageRegistry() {
    imageRegistry = new ImageRegistry();
    imageDescriptors = new HashMap<String, ImageDescriptor>();
    registerImage(IMG_WIZARD, URL_WIZBAN + "install_wiz.gif");
    registerImage(IMG_EXTENSION, URL_OBJ + "iu_obj.gif");
    PlatformUI.getWorkbench().getProgressService().registerIconForFamily(getImageDescriptor(IMG_EXTENSION), Activator.JOB_FAMILY);
}
Also used : ImageRegistry(org.eclipse.jface.resource.ImageRegistry) ImageDescriptor(org.eclipse.jface.resource.ImageDescriptor)

Example 29 with ImageRegistry

use of org.eclipse.jface.resource.ImageRegistry in project eclipse-integration-commons by spring-projects.

the class BrowserImages method init.

private static synchronized void init() {
    if (imageRegistry == null) {
        imageRegistry = new ImageRegistry();
        img(IMG_NAV_HOME, "icons/home_16.png");
    }
}
Also used : ImageRegistry(org.eclipse.jface.resource.ImageRegistry)

Example 30 with ImageRegistry

use of org.eclipse.jface.resource.ImageRegistry in project pmd-eclipse-plugin by pmd.

the class PMDPlugin method getImage.

/**
 * Get an image corresponding to the severity
 */
public Image getImage(String key, String iconPath) {
    ImageRegistry registry = getImageRegistry();
    Image image = registry.get(key);
    if (image == null) {
        ImageDescriptor descriptor = getImageDescriptor(iconPath);
        if (descriptor != null) {
            registry.put(key, descriptor);
            image = registry.get(key);
        }
    }
    return image;
}
Also used : ImageRegistry(org.eclipse.jface.resource.ImageRegistry) ImageDescriptor(org.eclipse.jface.resource.ImageDescriptor) Image(org.eclipse.swt.graphics.Image)

Aggregations

ImageRegistry (org.eclipse.jface.resource.ImageRegistry)63 ImageDescriptor (org.eclipse.jface.resource.ImageDescriptor)25 Image (org.eclipse.swt.graphics.Image)22 URL (java.net.URL)4 ResourceBundle (java.util.ResourceBundle)4 Before (org.junit.Before)4 CoreRuntimePlugin (org.talend.core.runtime.CoreRuntimePlugin)4 CompositeMultiImageDescriptor (com.archimatetool.editor.ui.components.CompositeMultiImageDescriptor)3 ResourceImageDescriptor (de.jaret.util.ui.ResourceImageDescriptor)3 CompositeImageDescriptor (org.eclipse.jface.resource.CompositeImageDescriptor)3 Label (org.eclipse.swt.widgets.Label)3 RepositoryContext (org.talend.core.context.RepositoryContext)3 Project (org.talend.core.model.general.Project)3 User (org.talend.core.model.properties.User)3 IRepositoryFactory (org.talend.core.repository.model.IRepositoryFactory)3 ProxyRepositoryFactory (org.talend.core.repository.model.ProxyRepositoryFactory)3 XmiResourceManager (org.talend.core.repository.utils.XmiResourceManager)3 IRepositoryNodeConfiguration (org.talend.mdm.repository.core.IRepositoryNodeConfiguration)3 IRepositoryNodeResourceProvider (org.talend.mdm.repository.core.IRepositoryNodeResourceProvider)3 RecycleBinNodeConfiguration (org.talend.mdm.repository.core.impl.recyclebin.RecycleBinNodeConfiguration)3