public final class StorageImageAsync
- Object
- Image
- EncodedImage
- StorageImageAsync
ImplementsActionSource
Methods
public 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. |
protected void resetCache() | A subclass might choose to load asynchroniously and reset the cache when the image is ready. |
protected Image getInternal() | Returns the actual image represented by the encoded image, this image will be cached in a weak/soft reference internally. |
public byte[] getImageData() | Returns the byte array data backing the image allowing the image to be stored and discarded completely from RAM. |
public boolean animate() | Advances this image’s animation state, if it is animated. |
public boolean isAnimation() | Returns true if this is an animated image |
Inherited methods
From EncodedImage
createMulti, createFromImage, createFromRGB, create, create, create, create, create, dispose, isDisposed, getImage, isLocked, asyncLock, lock, unlock, subImage, rotate, modifyAlpha, modifyAlpha, getGraphics, getWidth, getHeight, drawImage, drawImage, toRGB, scaledWidth, scaledHeight, scaledSmallerRatio, scaledEncoded, scaled, scale, isOpaque
From Image
isSimdOptimizationsEnabled, setSimdOptimizationsEnabled, resetSimdOptimizationsEnabled, isSVGSupported, createSVG, createIndexed, createImage, createImage, createImage, createImage, createImage, isAlphaMutableImageSupported, createImage, createImage, exifRotation, exifRotation, exifRotation, getExifOrientationTag, getExifOrientationTag, isJPEG, isPNG, getSVGDocument, isSVG, createMask, applyMask, applyMask, applyMaskAutoScale, mirror, modifyAlphaWithTranslucency, getRGB, getRGB, getRGBCached, scaledLargerRatio, fill, getImageName, setImageName, rotate90Degrees, rotate180Degrees, rotate270Degrees, flipHorizontally, flipVertically, requiresDrawImage, addActionListener, removeActionListener, fireChangedEvent
Method details
create
public static StorageImageAsync create(String fileName, Image placeholder)Parameters
fileNameString- the name of the storage file
placeholderImage- an image that must be of the same size as the EncodedImage
Returns
resetCache
protected void resetCache()getInternal
protected Image getInternal()Returns
getImageData
public byte[] getImageData()Returns
animate
public boolean animate()Returns
true if the animation state changed.isAnimation
public boolean isAnimation()