Package org.eclipse.jface.resource

Examples of org.eclipse.jface.resource.ImageDescriptor.createImage()


      // Grab the image from the provider, if needed
      if (result == null) {
        ImageDescriptor imageDesc = iconProvider.getServiceIcon(entry.getOffering(), server);

        if (imageDesc != null) {
          Image img = imageDesc.createImage();
          final Image resizeImg = resizeImage(img, 32, 32);
          result = resizeImg;
          synchronized (imageMap) {
            imageMap.put(mapId, resizeImg);
          }
View Full Code Here


      return workbenchLabelProvider.getImage(ProjectUtil.getSyncDirectory(getProject()));
    } else if (typeFile && resource!=null) {
      if (mimeType!=null && mimeType.length()!=0) {
        ImageDescriptor desc = getImageDescriptor(resource.getName(), mimeType);
        if (desc!=null) {
          return desc.createImage();
        }
      }
      if (isVaultFile) {
        return WhitelabelSupport.getJcrNodeIcon().createImage();
      }
View Full Code Here

      } catch (MalformedURLException e) {
        throw new ImageNotFoundException("Image : " + path + " not found");
      }
 
      ImageDescriptor projectImageDescriptor = ImageDescriptor.createFromURL(url);
      image = projectImageDescriptor.createImage();
      images.put(path, image);
    }
    return image;
  }
}
View Full Code Here

        if (path == null) {
            return null;
        }
        final ImageDescriptor imageDescription = AbstractUIPlugin
                .imageDescriptorFromPlugin("org.erlide.ui", path);
        return imageDescription.createImage();
    }

    private List<String> getTags(final IConfigurationElement element) {
        final List<String> result = Lists.newArrayList();
        for (final IConfigurationElement tagElement : element.getChildren()) {
View Full Code Here

        if (result != null) {
            return result;
        }

        assertThat(fDisplay, is(SWTUtil.getStandardDisplay()));
        result = descriptor.createImage();
        if (result != null) {
            fRegistry.put(descriptor, result);
        }
        return result;
    }
View Full Code Here

    super();
  }

  public Image createImage(String resource) {
    ImageDescriptor desc = AbstractUIPlugin.imageDescriptorFromPlugin(XMLUIPlugin.ID, resource);
    Image image = desc.createImage();
    JFaceResources.getImageRegistry().put(resource, image);
    return image;
  }

  public Image getImage(String resource) {
View Full Code Here

      IEditorRegistry er = PlatformUI.getWorkbench().getEditorRegistry();
      ImageDescriptor imageDescriptor = er.getImageDescriptor(uri);
      Image image = (Image) imageTable.get(imageDescriptor);
      if (image == null) {
        image = imageDescriptor.createImage();
        imageTable.put(imageDescriptor, image);
      }
      base = image;

      if (base != null) {
View Full Code Here

    {
        if (imageMap.get(imagePath) == null)
        {
            ImageDescriptor imageDescriptor = imageDescriptorFromPlugin(PLUGIN_ID, "icons/" + imagePath);

            imageMap.put(imagePath, imageDescriptor.createImage());
        }

        return imageMap.get(imagePath);
    }
View Full Code Here

    {
        if (imageMap.get(imagePath) == null)
        {
            ImageDescriptor imageDescriptor = imageDescriptorFromPlugin(PLUGIN_ID, "icons/" + imagePath);

            imageMap.put(imagePath, imageDescriptor.createImage());
        }

        return imageMap.get(imagePath);
    }
View Full Code Here

                    res = PlatformUI.getWorkbench().getSharedImages().
                            getImage(ISharedImages.IMG_OBJ_FILE);
                } else {
                    res = images.get(descriptor);
                    if (res == null) {
                        res = descriptor.createImage();
                        images.put(descriptor, res);
                    }
                    res = descriptor.createImage();
                }
                break;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.