if (imageStream != null) {
img = new Image(display, imageStream);
- if (img == null) {
- throw new NullPointerException("couldn't load " + tmp);
- }
-
mLoadedImages.put(filename, img);
+ }
- return img;
+ if (img == null) {
+ throw new RuntimeException("Failed to load " + tmp);
}
}
* Extra parameters allows for creation of a replacement image of the
* loading failed.
*
- * @param loader the image loader used.
* @param display the Display object
* @param fileName the file name
* @param width optional width to create replacement Image. If -1, null be
public AboutDialog(Shell shell) {
super(shell);
ImageLoader imageLoader = ImageLoader.getLoader(HierarchyViewerDirector.class);
- mSmallImage = imageLoader.loadImage("load-view-hierarchy.png", Display.getDefault()); //$NON-NLS-1$
- mAboutImage = imageLoader.loadImage("about.jpg", Display.getDefault()); //$NON-NLS-1$
+ mSmallImage = imageLoader.loadImage("sdk-hierarchyviewer-16.png", Display.getDefault()); //$NON-NLS-1$
+ mAboutImage = imageLoader.loadImage("sdk-hierarchyviewer-128.png", Display.getDefault()); //$NON-NLS-1$
}
@Override
this.mShell = shell;
setAccelerator(SWT.MOD1 + 'A');
ImageLoader imageLoader = ImageLoader.getLoader(HierarchyViewerDirector.class);
- mImage = imageLoader.loadImage("about-small.jpg", Display.getDefault()); //$NON-NLS-1$
+ mImage = imageLoader.loadImage("sdk-hierarchyviewer-16.png", Display.getDefault()); //$NON-NLS-1$
setImageDescriptor(ImageDescriptor.createFromImage(mImage));
setToolTipText("Shows the about dialog");
}
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
-LOCAL_JAVA_RESOURCE_DIRS := resources
+LOCAL_JAVA_RESOURCE_DIRS := ../src
LOCAL_JAR_MANIFEST := ../manifest.txt