Class IconExe.ImageLoader
- java.lang.Object
-
- org.eclipse.pde.internal.swt.tools.IconExe.ImageLoader
-
- Enclosing class:
- IconExe
static class IconExe.ImageLoader extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description intbackgroundPixelthe background pixel for the logical screen (this corresponds to the GIF89a Background Color Index value).IconExe.ImageData[]datathe array of ImageData objects in this ImageLoader.(package private) java.util.VectorimageLoaderListenersintlogicalScreenHeightthe height of the logical screen on which the images reside, in pixels (this corresponds to the GIF89a Logical Screen Height value)intlogicalScreenWidththe width of the logical screen on which the images reside, in pixels (this corresponds to the GIF89a Logical Screen Width value)intrepeatCountthe number of times to repeat the display of a sequence of animated images (this corresponds to the commonly-used GIF application extension for "NETSCAPE 2.0 01")
-
Constructor Summary
Constructors Constructor Description ImageLoader()Construct a new empty ImageLoader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IconExe.ImageData[]load(java.io.InputStream stream)Loads an array ofImageDataobjects from the specified input stream.IconExe.ImageData[]load(java.lang.String filename)Loads an array ofImageDataobjects from the file with the specified name.(package private) voidreset()Resets the fields of the ImageLoader, except for theimageLoaderListenersfield.
-
-
-
Field Detail
-
data
public IconExe.ImageData[] data
the array of ImageData objects in this ImageLoader. This array is read in when the load method is called, and it is written out when the save method is called
-
logicalScreenWidth
public int logicalScreenWidth
the width of the logical screen on which the images reside, in pixels (this corresponds to the GIF89a Logical Screen Width value)
-
logicalScreenHeight
public int logicalScreenHeight
the height of the logical screen on which the images reside, in pixels (this corresponds to the GIF89a Logical Screen Height value)
-
backgroundPixel
public int backgroundPixel
the background pixel for the logical screen (this corresponds to the GIF89a Background Color Index value). The default is -1 which means 'unspecified background'
-
repeatCount
public int repeatCount
the number of times to repeat the display of a sequence of animated images (this corresponds to the commonly-used GIF application extension for "NETSCAPE 2.0 01")
-
imageLoaderListeners
java.util.Vector imageLoaderListeners
-
-
Method Detail
-
reset
void reset()
Resets the fields of the ImageLoader, except for theimageLoaderListenersfield.
-
load
public IconExe.ImageData[] load(java.io.InputStream stream)
Loads an array ofImageDataobjects 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.- Parameters:
stream- the input stream to load the images from- Returns:
- an array of
ImageDataobjects loaded from the specified input stream - Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the stream is null
java.lang.RuntimeException-- ERROR_INVALID_IMAGE - if the image file contains invalid data
- ERROR_IO - if an input/output error occurs while reading data
- ERROR_UNSUPPORTED_FORMAT - if the image file contains an unrecognized format
-
load
public IconExe.ImageData[] load(java.lang.String filename)
Loads an array ofImageDataobjects 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.- Parameters:
filename- the name of the file to load the images from- Returns:
- an array of
ImageDataobjects loaded from the specified file - Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the file name is null
java.lang.RuntimeException-- ERROR_INVALID_IMAGE - if the image file contains invalid data
- ERROR_IO - if an IO error occurs while reading data
- ERROR_UNSUPPORTED_FORMAT - if the image file contains an unrecognized format
-
-