Package noaa.coastwatch.gui
Class ImageLoader
java.lang.Object
noaa.coastwatch.gui.ImageLoader
- All Implemented Interfaces:
ImageConsumer
The image loader class is used to render an image asychronously
from an image producer. Each loader is coupled with an observer
object that displays the image data as it is being loaded.
- Since:
- 3.1.3
- Author:
- Peter Hollemans
-
Field Summary
Fields inherited from interface java.awt.image.ImageConsumer
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
-
Constructor Summary
ConstructorDescriptionImageLoader
(Image image, ImageLoaderObserver observer) Creates a new image loader for the specified image. -
Method Summary
Modifier and TypeMethodDescriptiongetDims()
Gets the image dimensions.boolean
Gets the image loading status.void
imageComplete
(int status) void
setColorModel
(ColorModel model) void
setDimensions
(int width, int height) void
setHints
(int hintflags) void
setPixels
(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize) void
setPixels
(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize) void
setProperties
(Hashtable props) void
Starts image loading.void
Stops image loading.
-
Constructor Details
-
ImageLoader
Creates a new image loader for the specified image.
-
-
Method Details
-
getDims
Gets the image dimensions. -
getLoading
public boolean getLoading()Gets the image loading status. -
startLoading
public void startLoading()Starts image loading. -
stopLoading
public void stopLoading()Stops image loading. -
imageComplete
public void imageComplete(int status) - Specified by:
imageComplete
in interfaceImageConsumer
-
setColorModel
- Specified by:
setColorModel
in interfaceImageConsumer
-
setDimensions
public void setDimensions(int width, int height) - Specified by:
setDimensions
in interfaceImageConsumer
-
setHints
public void setHints(int hintflags) - Specified by:
setHints
in interfaceImageConsumer
-
setPixels
public void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize) - Specified by:
setPixels
in interfaceImageConsumer
-
setPixels
public void setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize) - Specified by:
setPixels
in interfaceImageConsumer
-
setProperties
- Specified by:
setProperties
in interfaceImageConsumer
-