public class StorageImageAsync extends EncodedImage
Modifier and Type | Method and Description |
---|---|
boolean |
animate() |
static StorageImageAsync |
create(String fileName,
Image placeholder)
Creates an encoded image that maps to a storage file thus allowing to
seamlessly cache images as needed.
|
byte[] |
getImageData()
Returns the byte array data backing the image allowing the image to be stored
and discarded completely from RAM.
|
protected Image |
getInternal()
Returns the actual image represented by the encoded image, this image will
be cached in a weak/soft reference internally.
|
boolean |
isAnimation()
Returns true if this is an animated image
|
protected void |
resetCache()
A subclass might choose to load asynchroniously and reset the cache when the image is ready.
|
asyncLock, create, create, create, create, create, createFromImage, createFromRGB, createMulti, drawImage, drawImage, getGraphics, getHeight, getImage, getWidth, isLocked, isOpaque, lock, modifyAlpha, modifyAlpha, rotate, scale, scaled, scaledEncoded, scaledHeight, scaledSmallerRatio, scaledWidth, subImage, toRGB, unlock
addActionListener, applyMask, applyMask, applyMaskAutoScale, createImage, createImage, createImage, createImage, createImage, createImage, createImage, createIndexed, createMask, createSVG, dispose, exifRotation, exifRotation, exifRotation, fill, fireChangedEvent, flipHorizontally, flipVertically, getExifOrientationTag, getExifOrientationTag, getImageName, getRGB, getRGB, getRGBCached, getSVGDocument, isAlphaMutableImageSupported, isJPEG, isPNG, isSVG, isSVGSupported, mirror, modifyAlphaWithTranslucency, removeActionListener, requiresDrawImage, rotate180Degrees, rotate270Degrees, rotate90Degrees, scaledLargerRatio, setImageName
protected void resetCache()
resetCache
in class EncodedImage
protected Image getInternal()
getInternal
in class EncodedImage
public byte[] getImageData()
getImageData
in class EncodedImage
public boolean isAnimation()
isAnimation
in class EncodedImage
public static StorageImageAsync create(String fileName, Image placeholder)
fileName
- the name of the storage fileplaceholder
- an image that must be of the same size as the EncodedImage