Package org.eclipse.jface.resource

Examples of org.eclipse.jface.resource.ImageRegistry


    if (idx >= OBJ_COVERAGE.length) idx = OBJ_COVERAGE.length - 1;
    return getImage(OBJ_COVERAGE[idx]);
  }
 
  private static ImageRegistry loadImage(String path) {
    ImageRegistry reg = getInstance().getImageRegistry();
    if (reg.getDescriptor(path) == null) {
      URL url = instance.getBundle().getEntry(path);
      reg.put(path, ImageDescriptor.createFromURL(url));
    }
    return reg;
  }
View Full Code Here


      idx = OBJ_COVERAGE_OVERLAY.length - 1;
    return getImageDescriptor(OBJ_COVERAGE_OVERLAY[idx]);
  }

  private static ImageRegistry loadImage(String path) {
    ImageRegistry reg = getInstance().getImageRegistry();
    if (reg.getDescriptor(path) == null) {
      URL url = instance.getBundle().getEntry(path);
      reg.put(path, ImageDescriptor.createFromURL(url));
    }
    return reg;
  }
View Full Code Here

    if (idx >= OBJ_COVERAGE_OVERLAY.length) idx = OBJ_COVERAGE_OVERLAY.length - 1;
    return getImageDescriptor(OBJ_COVERAGE_OVERLAY[idx]);
  }
 
  private static ImageRegistry loadImage(String path) {
    ImageRegistry reg = getInstance().getImageRegistry();
    if (reg.getDescriptor(path) == null) {
      URL url = instance.getBundle().getEntry(path);
      reg.put(path, ImageDescriptor.createFromURL(url));
    }
    return reg;
  }
View Full Code Here

      idx = OBJ_COVERAGE_OVERLAY.length - 1;
    return getImageDescriptor(OBJ_COVERAGE_OVERLAY[idx]);
  }

  private static ImageRegistry loadImage(String path) {
    ImageRegistry reg = getInstance().getImageRegistry();
    if (reg.getDescriptor(path) == null) {
      URL url = instance.getBundle().getEntry(path);
      reg.put(path, ImageDescriptor.createFromURL(url));
    }
    return reg;
  }
View Full Code Here

    if (idx >= OBJ_COVERAGE.length) idx = OBJ_COVERAGE.length - 1;
    return getImage(OBJ_COVERAGE[idx]);
  }
 
  private static ImageRegistry loadImage(String path) {
    ImageRegistry reg = getInstance().getImageRegistry();
    if (reg.getDescriptor(path) == null) {
      URL url = instance.getBundle().getEntry(path);
      reg.put(path, ImageDescriptor.createFromURL(url));
    }
    return reg;
  }
View Full Code Here

   * Method to create the editor's pin ImageDescriptor
   *
   * @return the single image descriptor for the editor's pin icon
   */
  ImageDescriptor getEditorPinImageDesc() {
    ImageRegistry registry = JFaceResources.getImageRegistry();
    ImageDescriptor pinDesc = registry.getDescriptor(PIN_EDITOR_KEY);
    // Avoid registering twice
    if (pinDesc == null) {
      pinDesc = WorkbenchImages.getWorkbenchImageDescriptor(PIN_EDITOR);
      registry.put(PIN_EDITOR_KEY, pinDesc);

    }
    return pinDesc;
  }
View Full Code Here

   *      java.lang.Object)
   */
  public void registerIconForFamily(ImageDescriptor icon, Object family) {
    String key = IMAGE_KEY + String.valueOf(imageKeyTable.size());
    imageKeyTable.put(family, key);
    ImageRegistry registry = JFaceResources.getImageRegistry();

    // Avoid registering twice
    if (registry.getDescriptor(key) == null) {
      registry.put(key, icon);
    }

  }
View Full Code Here

     * @return the image descriptor
     */
    public static ImageDescriptor getImageDescriptor(String path) {

        DroolsEclipsePlugin plugin = getDefault();
        ImageRegistry reg = plugin.getImageRegistry();
        ImageDescriptor des = reg.getDescriptor( path );
        if ( des == null ) {
            des = AbstractUIPlugin.imageDescriptorFromPlugin( "org.drools.eclipse",
                                                              path );
            reg.put( path,
                     des );
        }
        return des;
    }
View Full Code Here

     * @return the image descriptor
     */
    public static ImageDescriptor getImageDescriptor(String path) {

        DroolsEclipsePlugin plugin = getDefault();
        ImageRegistry reg = plugin.getImageRegistry();
        ImageDescriptor des = reg.getDescriptor( path );
        if ( des == null ) {
            des = AbstractUIPlugin.imageDescriptorFromPlugin( "org.drools.eclipse",
                                                              path );
            reg.put( path,
                     des );
        }
        return des;
    }
View Full Code Here

        return (String[]) containers.toArray(new String[containers.size()]);
    }
   
   
    protected ImageRegistry createImageRegistry() {
      final ImageRegistry registry = super.createImageRegistry();
     
    URL url = null;
    try {
      url = new URL(CactusPlugin.getDefault().getDescriptor().getInstallURL(),"icons/calaunch.gif");
    } catch (MalformedURLException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
      //ImageDescriptor imageDescriptor = ImageDescriptor.createFromURL(CactusPlugin
      //    .getDefault().getBundle().getResource("icons/calaunch.gif"));
      registry.put(CACTUS_RUN_IMAGE, ImageDescriptor.createFromURL(url));
      return registry;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.resource.ImageRegistry

Copyright © 2018 www.massapicom. 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.