com.aelitis.azureus.ui.swt.imageloader
Class ImageLoader
java.lang.Object
com.aelitis.azureus.ui.swt.imageloader.ImageLoader
- All Implemented Interfaces:
- AEDiagnosticsEvidenceGenerator
public class ImageLoader
- extends Object
- implements AEDiagnosticsEvidenceGenerator
Loads images from a skinProperty object.
Will look for special suffixes (over, down, disabled) and try to
load resources using base key and suffix. ie. loadImage("foo-over") when
foo=image.png, will load image-over.png
Will also create own disabled images if base image found and no disabled
image found. Disabled opacity can be set via imageloader.disabled-opacity
key
- Author:
- TuxPaper
Field Summary |
static org.eclipse.swt.graphics.Image |
noImage
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
noImage
public static org.eclipse.swt.graphics.Image noImage
ImageLoader
public ImageLoader(org.eclipse.swt.widgets.Display display,
SkinProperties skinProperties)
getInstance
public static ImageLoader getInstance()
unLoadImages
public void unLoadImages()
getImageFromMap
protected org.eclipse.swt.graphics.Image getImageFromMap(String sKey)
getImagesFromMap
protected org.eclipse.swt.graphics.Image[] getImagesFromMap(String sKey)
getImages
public org.eclipse.swt.graphics.Image[] getImages(String sKey)
getImage
public org.eclipse.swt.graphics.Image getImage(String sKey)
releaseImage
public long releaseImage(String sKey)
addImage
public void addImage(String key,
org.eclipse.swt.graphics.Image image)
- Adds image to repository. refcount will be 1, or if key already exists,
refcount will increase.
- Parameters:
key
- image
- - Since:
- 4.0.0.5
addImage
public void addImage(String key,
org.eclipse.swt.graphics.Image[] images)
addImageNoDipose
public void addImageNoDipose(String key,
org.eclipse.swt.graphics.Image image)
getNoImage
public static org.eclipse.swt.graphics.Image getNoImage()
imageExists
public boolean imageExists(String name)
imageAdded_NoSWT
public boolean imageAdded_NoSWT(String name)
imageAdded
public boolean imageAdded(String name)
isRealImage
public static boolean isRealImage(org.eclipse.swt.graphics.Image image)
getAnimationDelay
public int getAnimationDelay(String sKey)
getUrlImage
public org.eclipse.swt.graphics.Image getUrlImage(String url,
ImageLoader.ImageDownloaderListener l)
getUrlImage
public org.eclipse.swt.graphics.Image getUrlImage(String url,
org.eclipse.swt.graphics.Point maxSize,
ImageLoader.ImageDownloaderListener l)
- Get an
Image
from an url. URL will be the key, which you
can use later to releaseImage(String)
generate
public void generate(IndentWriter writer)
- Specified by:
generate
in interface AEDiagnosticsEvidenceGenerator
addSkinProperties
public void addSkinProperties(SkinProperties skinProperties)
collectGarbage
public void collectGarbage()
- Since:
- 4.0.0.5
setLabelImage
public void setLabelImage(org.eclipse.swt.widgets.Label label,
String key)
- Parameters:
label
- key
- - Since:
- 4.0.0.5
setButtonImage
public org.eclipse.swt.graphics.Image setButtonImage(org.eclipse.swt.widgets.Button btn,
String key)
setBackgroundImage
public void setBackgroundImage(org.eclipse.swt.widgets.Control control,
String key)
getSkinProperties
public SkinProperties[] getSkinProperties()