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 java.lang.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(java.lang.String sKey)
getImagesFromMap
protected org.eclipse.swt.graphics.Image[] getImagesFromMap(java.lang.String sKey)
getImages
public org.eclipse.swt.graphics.Image[] getImages(java.lang.String sKey)
getImage
public org.eclipse.swt.graphics.Image getImage(java.lang.String sKey)
releaseImage
public long releaseImage(java.lang.String sKey)
addImage
public void addImage(java.lang.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(java.lang.String key,
org.eclipse.swt.graphics.Image[] images)
addImageNoDipose
public void addImageNoDipose(java.lang.String key,
org.eclipse.swt.graphics.Image image)
getNoImage
public static org.eclipse.swt.graphics.Image getNoImage()
imageExists
public boolean imageExists(java.lang.String name)
imageAdded_NoSWT
public boolean imageAdded_NoSWT(java.lang.String name)
imageAdded
public boolean imageAdded(java.lang.String name)
isRealImage
public static boolean isRealImage(org.eclipse.swt.graphics.Image image)
getAnimationDelay
public int getAnimationDelay(java.lang.String sKey)
getUrlImage
public org.eclipse.swt.graphics.Image getUrlImage(java.lang.String url,
ImageLoader.ImageDownloaderListener l)
getUrlImage
public org.eclipse.swt.graphics.Image getUrlImage(java.lang.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,
java.lang.String key)
- Parameters:
label
- key
- - Since:
- 4.0.0.5
setButtonImage
public org.eclipse.swt.graphics.Image setButtonImage(org.eclipse.swt.widgets.Button btn,
java.lang.String key)
setBackgroundImage
public void setBackgroundImage(org.eclipse.swt.widgets.Control control,
java.lang.String key)
getSkinProperties
public SkinProperties[] getSkinProperties()