public class FileEncodedImageAsync extends EncodedImage
| Modifier and Type | Method and Description |
|---|---|
boolean |
animate() |
static FileEncodedImageAsync |
create(String fileName,
byte[] placeholder,
int width,
int height)
Deprecated.
use the version that accepts a name and a placeholderImage
|
static FileEncodedImageAsync |
create(String fileName,
Image placeholder)
Creates an encoded image that maps to a local file thus allowing to
seamlessly fetch files 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, unlockaddActionListener, 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, setImageNameprotected void resetCache()
resetCache in class EncodedImageprotected Image getInternal()
getInternal in class EncodedImagepublic byte[] getImageData()
getImageData in class EncodedImagepublic boolean isAnimation()
isAnimation in class EncodedImagepublic static FileEncodedImageAsync create(String fileName, byte[] placeholder, int width, int height)
fileName - the name of the fileplaceholder - a placeholder image until the actual image loadswidth - the width of the file or -1 if unknown (notice that this will improve performance)height - the height of the file or -1 if unknown (notice that this will improve performance)public static FileEncodedImageAsync create(String fileName, Image placeholder)
fileName - the name of the fileplaceholder - an image that will occupy the space