Examples of ImageRegistry


Examples of org.eclipse.jface.resource.ImageRegistry

        }
        return imageRegistry;
    }

    public static ImageRegistry initializeImageRegistry() {
        imageRegistry= new ImageRegistry();
        imageDescriptors = new HashMap(30);
        declareImages();
        return imageRegistry;
    }
View Full Code Here

Examples of org.eclipse.jface.resource.ImageRegistry

     */
    static ImageRegistry getImageRegistry()
    {
        if (fgImageRegistry == null)
        {
            fgImageRegistry = new ImageRegistry();
            for (Iterator iter = fgAvoidSWTErrorMap.keySet().iterator(); iter
                .hasNext();)
            {
                String key = (String) iter.next();
                fgImageRegistry.put(key,
View Full Code Here

Examples of org.eclipse.jface.resource.ImageRegistry

  /**
   * Lazily initializes image map.
   */
  public static Image getImage(ImageDescriptor imageDescriptor) {
    ImageRegistry imageRegistry = getImageRegistry();

    Image image = imageRegistry.get("" + imageDescriptor.hashCode()); //$NON-NLS-1$
    if (image == null) {
      image = imageDescriptor.createImage();
      imageRegistry.put("" + imageDescriptor.hashCode(), image); //$NON-NLS-1$
    }
    return image;
  }
View Full Code Here

Examples of org.eclipse.jface.resource.ImageRegistry

    return null;
  }

  private static ImageRegistry getImageRegistry() {
    if (imageRegistry == null) {
      imageRegistry = new ImageRegistry();
    }

    return imageRegistry;
  }
View Full Code Here

Examples of org.eclipse.jface.resource.ImageRegistry

        getActiveDisplay().syncExec(runnable);
    }

    public static Image cacheImage(String path, ClassLoader classLoader)
    {
        ImageRegistry registry = SigilUI.getDefault().getImageRegistry();

        Image image = registry.get(path);

        if (image == null)
        {
            image = loadImage(path, classLoader);
            // XXX-FIXME-XXX add null image
            if (image != null)
            {
                registry.put(path, image);
            }
        }

        return image;
    }
View Full Code Here

Examples of org.eclipse.jface.resource.ImageRegistry

        return false;
    }

    public static Image loadImage(URL url) throws IOException
    {
        ImageRegistry registry = getDefault().getImageRegistry();

        String key = url.toExternalForm();
        Image img = registry.get(key);

        if (img == null)
        {
            img = openImage(url);
            registry.put(key, img);
        }

        return img;
    }
View Full Code Here

Examples of org.eclipse.jface.resource.ImageRegistry

    }
  }

  public Image getImage(Object obj) {
    String imageKey = ISharedImages.IMG_OBJ_ELEMENT;
    ImageRegistry imgReg = MeclipsePlugin.getDefault().getImageRegistry();
    if (obj instanceof Connection) {
      if (((Connection) obj).getMongo() != null) {
        return imgReg.get(MeclipsePlugin.CONNECTION_IMG_ID);
      } else {
        return imgReg.get(MeclipsePlugin.CONNECTION_ERROR_IMG_ID);
      }
    }
    if (obj instanceof Database) {
      return imgReg.get(MeclipsePlugin.DATABASE_IMG_ID);
    }
    if (obj instanceof Collection) {
      return imgReg.get(MeclipsePlugin.COLLECTION_IMG_ID);
    }
    if (obj instanceof Filter) {
      return imgReg.get(MeclipsePlugin.FILTER_IMG_ID);
    }
    if (obj instanceof TreeParent)
      imageKey = ISharedImages.IMG_OBJ_FOLDER;
    return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey);
  }
View Full Code Here

Examples of org.eclipse.jface.resource.ImageRegistry

        }
        return fgImageRegistry;
    }

    private static void initializeImageRegistry() {
        fgImageRegistry = new ImageRegistry(ErlideUIPlugin.getStandardDisplay());
        declareImages();
    }
View Full Code Here

Examples of org.eclipse.jface.resource.ImageRegistry

    }

    public static synchronized ImageRegistry getImageRegistry() {
        if (image_registry == null) {

            image_registry = new ImageRegistry();

            Class<?> baseClass = LoaderWindow.class;

            image_registry.put("sfdc_icon",
                    ImageDescriptor.createFromURL(baseClass.getClassLoader().getResource("img/icons/icon_sforceDL16x16.bmp")));
View Full Code Here

Examples of org.eclipse.jface.resource.ImageRegistry

     * @param path the path
     * @return the image descriptor
     */
    public static ImageDescriptor getImageDescriptor(String path) {
        JBPMEclipsePlugin plugin = getDefault();
        ImageRegistry reg = plugin.getImageRegistry();
        ImageDescriptor des = reg.getDescriptor(path);
        if (des == null) {
            des = AbstractUIPlugin.imageDescriptorFromPlugin("org.jbpm.eclipse", path);
            reg.put(path, des);
        }
        return des;
    }
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.