java.lang.Object | +--org.eclipse.swt.graphics.ImageLoader
Unsafe:
int
backgroundPixel
int
logicalScreenHeight
int
logicalScreenWidth
int
repeatCount
ImageLoader()
void
addImageLoaderListener(ImageLoaderListener listener)
boolean
hasListeners()
true if the receiver has image loader
listeners, and false otherwise.
ImageData[]
load(InputStream stream)
ImageData objects from the
specified input stream.
ImageData[]
load(String filename)
ImageData objects from the
file with the specified name.
void
notifyListeners(ImageLoaderEvent event)
void
removeImageLoaderListener(ImageLoaderListener listener)
(package private) void
reset()
imageLoaderListeners field.
void
save(OutputStream stream,
int format)
void
save(String filename,
int format)
public ImageData[] data
public int logicalScreenWidth
public int logicalScreenHeight
public int backgroundPixel
public int repeatCount
Vector imageLoaderListeners
public ImageLoader()
void reset()
imageLoaderListeners field.
public ImageData[] load(InputStream stream)
ImageData objects from the
specified input stream. Throws an error if either an error
occurs while loading the images, or if the images are not
of a supported type. Returns the loaded image data array.
stream - the input stream to load the images from
ImageData objects loaded from the specified input streampublic ImageData[] load(String filename)
ImageData objects from the
file with the specified name. Throws an error if either
an error occurs while loading the images, or if the images are
not of a supported type. Returns the loaded image data array.
filename - the name of the file to load the images from
ImageData objects loaded from the specified filepublic void save(OutputStream stream, int format)
IMAGE_BMPIMAGE_BMP_RLEIMAGE_GIFIMAGE_ICOIMAGE_JPEGIMAGE_PNG
stream - the output stream to write the images toformat - the format to write the images inpublic void save(String filename, int format)
IMAGE_BMPIMAGE_BMP_RLEIMAGE_GIFIMAGE_ICOIMAGE_JPEGIMAGE_PNG
filename - the name of the file to write the images toformat - the format to write the images inpublic void addImageLoaderListener(ImageLoaderListener listener)
An ImageLoaderListener should be added before invoking
one of the receiver's load methods. The listener's
imageDataLoaded method is called when image
data has been partially loaded, as is supported by interlaced
GIF/PNG or progressive JPEG images.
listener - the ImageLoaderListener to addImageLoaderListener,
ImageLoaderEventpublic void removeImageLoaderListener(ImageLoaderListener listener)
listener - the ImageLoaderListener to removeaddImageLoaderListener(org.eclipse.swt.graphics.ImageLoaderListener)public boolean hasListeners()
true if the receiver has image loader
listeners, and false otherwise.
true if there are ImageLoaderListeners, and false otherwiseaddImageLoaderListener(org.eclipse.swt.graphics.ImageLoaderListener),
removeImageLoaderListener(org.eclipse.swt.graphics.ImageLoaderListener)public void notifyListeners(ImageLoaderEvent event)
event - the ImageLoaderEvent to send to each ImageLoaderListener