Package org.eclipse.jface.resource

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


      if (lblImage != null)
        lblImage.dispose();
      try {
        ImageDescriptor d = ImageDescriptor.createFromURL(imgFile
            .getLocationURI().toURL());
        lblImage = d.createImage();
        lblPreview.setImage(lblImage);
      } catch (Exception e) {
        WidgetPlugin.getLogger().error(e);
      }
    }
View Full Code Here


          File.separator, name);
      ImageDescriptor imageDescriptor = AbstractUIPlugin
          .imageDescriptorFromPlugin(brandPluginID, imageLocation);

      if (imageDescriptor != null) {
        return imageDescriptor.createImage();
      } else {
        String errorMessage = String
            .format("Could not find the icon '%s' in '%s'. Using the default image instead.",
                imageLocation, brandPluginID);
        System.err.println(errorMessage);
View Full Code Here

      + "unknown.png";

  private static Image getDefaultImage() {
    ImageDescriptor imageDescriptor = AbstractUIPlugin
        .imageDescriptorFromPlugin(null, DEFAULT_IMAGE_LOCATION);
    return imageDescriptor.createImage();
  }

  @Override
  public String getType() {
    return Constant.Workflow;
View Full Code Here

          File.separator, name);
      ImageDescriptor imageDescriptor = AbstractUIPlugin
          .imageDescriptorFromPlugin(brandPluginID, imageLocation);

      if (imageDescriptor != null) {
        return imageDescriptor.createImage();
      } else {
        String errorMessage = String
            .format("Could not find the icon '%s' in '%s'. Using the default image instead.",
                imageLocation, brandPluginID);
        // TODO: Should change to Log.Debug if possible.
View Full Code Here

  public static Image getDefaultImage() {
    ImageDescriptor imageDescriptor = AbstractUIPlugin
        .imageDescriptorFromPlugin(brandPluginID,
            DEFAULT_IMAGE_LOCATION);
    return imageDescriptor.createImage();
  }

  @Override
  public String getType() {
    return Constant.AlgorithmUIItem;
View Full Code Here

    if (imgFile != null) {
      try {
        ImageDescriptor d = ImageDescriptor.createFromURL(imgFile.getLocationURI().toURL());
        if (image != null)
          image.dispose();
        image = d.createImage();
        label.setImage(image);
      } catch (Exception e) {
        VisualSwingPlugin.getLogger().error(e);
      }
    }
View Full Code Here

            String.format("%sicons%s%s", File.separator, File.separator, name);
            ImageDescriptor imageDescriptor =
              AbstractUIPlugin.imageDescriptorFromPlugin(brandPluginID, imageLocation);

            if (imageDescriptor != null) {
              return imageDescriptor.createImage();
            } else {
              String errorMessage = String.format(
                "Could not find the icon '%s' in '%s'. Using the default image instead.",
                imageLocation,
                brandPluginID);
View Full Code Here

   
    private static Image getDefaultImage() {
      String thisPluginID = "org.cishell.reference.gui.datamanager"; //TODO: don't hardcode this
      ImageDescriptor imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(
          thisPluginID, DEFAULT_IMAGE_LOCATION);
      return imageDescriptor.createImage();
    }
}
View Full Code Here

      try {
        ImageDescriptor d = ImageDescriptor.createFromURL(imgFile
            .getLocationURI().toURL());
        if (image != null)
          image.dispose();
        image = d.createImage();
        label.setImage(image);
      } catch (Exception e) {
        e.printStackTrace();
      }
    }
View Full Code Here

          switch(columnIndex) {
          case 0:
            ImageDescriptor gd = game.getIconDescriptor();
           
            if (gd != null) {
              return gd.createImage();
            }
           
            return null;
          }
        }
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.