Examples of ImageRegistry


Examples of org.eclipse.jface.resource.ImageRegistry

        super();
    }
   
    public ImageDescriptor getImageDescriptor(String symbolicName) {
     
      ImageRegistry imageRegistry = getImageRegistry();
      ImageDescriptor imageDescriptor = imageRegistry.getDescriptor(symbolicName);
      if (imageDescriptor == null) {
        // create it from Path and add it to registry
        registerImage(getIconPath(), symbolicName);
      }
      return imageRegistry.getDescriptor(symbolicName);
    }
View Full Code Here

Examples of org.eclipse.jface.resource.ImageRegistry

      }
      return imageRegistry.getDescriptor(symbolicName);
    }

    public Image getImage(String symbolicName) {
      ImageRegistry imageRegistry = getImageRegistry();
      Image image = imageRegistry.get(symbolicName);
      if (image == null) {
        // create it from Path and add it to registry
        registerImage(getIconPath(), symbolicName);
      }
      return imageRegistry.get(symbolicName);
    }
View Full Code Here

Examples of org.eclipse.jface.resource.ImageRegistry

    }
   
    private void registerImage(IPath iconPath, String symbolicName) {
      URL imageUrl = FileLocator.find(getBundle(), iconPath.append(symbolicName), null);
        ImageDescriptor image = ImageDescriptor.createFromURL(imageUrl);
        ImageRegistry imageRegistry = getImageRegistry();
       
        imageRegistry.put(symbolicName, image);
  }
View Full Code Here

Examples of org.eclipse.jface.resource.ImageRegistry

            lvCloudMade.getList().setSelection(0);
        }    
        //endregion
       
        //region Set up image cache
        imageCache = new ImageRegistry(display);
       
        // load default image
        ImageDescriptor descDefault = ImageDescriptor.createFromFile(getClass(),
                OSMCloudMadeStylesManager.IMG_DEFAULT);
        imageCache.put(OSMCloudMadeStylesManager.CloudMadeStyle.EMPTY_STYLE_ID, descDefault);
View Full Code Here

Examples of org.eclipse.jface.resource.ImageRegistry

       
        Label text = new Label(control, SWT.HORIZONTAL | SWT.WRAP);
        text.setLayoutData(new RowData(400, 80));
        text.setText(Messages.Wizard_Ww_Example_Demis_Info);
       
        imageCache = new ImageRegistry(composite.getDisplay());
        ImageDescriptor desc = ImageDescriptor.createFromFile(getClass(),
                WWControl.IMG_DEMIS);
        imageCache.put(WWControl.IMG_DEMIS, desc);
       
        Composite imgControl = new Composite(control, SWT.NONE);
View Full Code Here

Examples of org.eclipse.jface.resource.ImageRegistry

            public void handleEvent(Event event) {
                Program.launch("http://www.openstreetmap.org/"); //$NON-NLS-1$
            }
        });

        imageCache = new ImageRegistry(composite.getDisplay());
        ImageDescriptor desc = ImageDescriptor.createFromFile(getClass(),
                OSMControl.IMG_OSM);
        imageCache.put(OSMControl.IMG_OSM, desc);
       
        Composite imgControl = new Composite(control, SWT.NONE);
View Full Code Here

Examples of org.eclipse.jface.resource.ImageRegistry

            public void handleEvent(Event event) {
                Program.launch("http://onearth.jpl.nasa.gov/tiled.html"); //$NON-NLS-1$
            }
        });

        imageCache = new ImageRegistry(composite.getDisplay());
        ImageDescriptor desc = ImageDescriptor.createFromFile(getClass(),
                NASAControl.IMG_NASA);
        imageCache.put(NASAControl.IMG_NASA, desc);
       
        Composite imgControl = new Composite(control, SWT.NONE);
View Full Code Here

Examples of org.eclipse.jface.resource.ImageRegistry

    /**
     * Creates the ImageRegistry and adds the two icons.
     */
    private void setUpImageCache(final Composite parent) {
        imageCache = new ImageRegistry(parent.getDisplay());
       
        ImageDescriptor descZoomOut = ImageDescriptor.createFromFile(getClass(),
                ICON_ZOOM_OUT_PATH);
        imageCache.put(ICON_ZOOM_OUT, descZoomOut);
       
View Full Code Here

Examples of org.eclipse.jface.resource.ImageRegistry

     * @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

Examples of org.eclipse.jface.resource.ImageRegistry

  public static ImageDescriptor getImageDescriptor(String path) {
    return imageDescriptorFromPlugin(PLUGIN_ID, path);
  }

  public static Image getSharedImage(String path) {
    ImageRegistry registry = getDefault().getImageRegistry();
    ImageDescriptor image_descriptor = registry.getDescriptor(path);
    if (image_descriptor == null) {
      image_descriptor = getImageDescriptor(path);
      registry.put(path, image_descriptor);
    }
    return registry.get(path);
  }
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.