|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.corona.ui.tools.ImageCache
public class ImageCache
The base class which is intedned to be extended by a bundle and then used. Class have two maps:
Constructor Summary | |
---|---|
protected |
ImageCache(org.osgi.framework.Bundle bundle)
The image cache constructor. |
Method Summary | |
---|---|
void |
dispose()
Method disposes all the images kept in the imageMap and imageMapByName. |
org.eclipse.swt.graphics.Image |
getImage(org.eclipse.jface.resource.ImageDescriptor imageDescriptor)
Returns the image that is represented by an image descriptor. |
org.eclipse.swt.graphics.Image |
getImage(java.lang.String imageName)
Returns the image that is represented by a given name. |
org.eclipse.jface.resource.ImageDescriptor |
getImageDescriptor(java.lang.String imagePath)
Returns image descriptor for given image source. |
boolean |
isMissingImageDescriptor(org.eclipse.jface.resource.ImageDescriptor image)
Mechod checks whether given imageDescriptoris equal to ImageDescriptor.getMissingImageDescriptor() image descriptor. |
void |
putImageDescriptor(java.lang.String imageName,
org.eclipse.jface.resource.ImageDescriptor img)
Method puts image created/retrieved into the imageMapByName, with custom image name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ImageCache(org.osgi.framework.Bundle bundle)
Method Detail |
---|
public org.eclipse.swt.graphics.Image getImage(org.eclipse.jface.resource.ImageDescriptor imageDescriptor)
imageDescriptor
- ImageDescriptor
for which Image should be returned.
Image
, or null if Image cannot be created.public org.eclipse.swt.graphics.Image getImage(java.lang.String imageName)
imageName
- image name to be found in imageMapByName, if it's not found it
will be created based on name.
Image
, or null if Image cannot be created.public void putImageDescriptor(java.lang.String imageName, org.eclipse.jface.resource.ImageDescriptor img)
imageName
- custom image name under which the image should be kept.img
- imageDescriptor to be stored in imageDescriptorMap.public org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(java.lang.String imagePath)
imagePath
- Path to image, where root is root of current plugin.
public void dispose()
public boolean isMissingImageDescriptor(org.eclipse.jface.resource.ImageDescriptor image)
ImageDescriptor.getMissingImageDescriptor()
image descriptor.
image
- to check against the MissingImageDescriptor.
|
Copyright 2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |