com.atlassian.core.util.thumbnail
Class SimpleImageConsumer

java.lang.Object
  extended by com.atlassian.core.util.thumbnail.SimpleImageConsumer
All Implemented Interfaces:
java.awt.image.ImageConsumer

public class SimpleImageConsumer
extends java.lang.Object
implements java.awt.image.ImageConsumer


Field Summary
 
Fields inherited from interface java.awt.image.ImageConsumer
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
 
Constructor Summary
SimpleImageConsumer()
           
 
Method Summary
 java.awt.image.BufferedImage getImage()
          Fetch the image.
 void imageComplete(int status)
           
 void setColorModel(java.awt.image.ColorModel model)
           
 void setDimensions(int w, int h)
          Notification of the dimensions of the source image.
 void setHints(int flags)
          Notification of load hints that may be useful.
 void setPixels(int x, int y, int w, int h, java.awt.image.ColorModel model, byte[] pixels, int offset, int scansize)
          Notification of a bunch of pixel values in byte form.
 void setPixels(int x, int y, int w, int h, java.awt.image.ColorModel model, int[] pixels, int offset, int scansize)
          Notification of a bunch of pixel values as ints.
 void setProperties(java.util.Hashtable props)
          Notification of the properties of the image to use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleImageConsumer

public SimpleImageConsumer()
Method Detail

imageComplete

public void imageComplete(int status)
Specified by:
imageComplete in interface java.awt.image.ImageConsumer

setColorModel

public void setColorModel(java.awt.image.ColorModel model)
Specified by:
setColorModel in interface java.awt.image.ImageConsumer

setDimensions

public void setDimensions(int w,
                          int h)
Notification of the dimensions of the source image.

Specified by:
setDimensions in interface java.awt.image.ImageConsumer
Parameters:
w - The width of the source image
h - The height of the source image

setHints

public void setHints(int flags)
Notification of load hints that may be useful. Not used in this implementation.

Specified by:
setHints in interface java.awt.image.ImageConsumer
Parameters:
flags - The hints

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      java.awt.image.ColorModel model,
                      byte[] pixels,
                      int offset,
                      int scansize)
Notification of a bunch of pixel values in byte form. Used for 256 color or less images (eg GIF, greyscale etc).

Specified by:
setPixels in interface java.awt.image.ImageConsumer
Parameters:
x - The starting x position of the pixels
y - The starting y position of the pixels
w - The number of pixels in the width
h - The number of pixels in the height
model - The color model used with these pixel values
offset - The offset into the source array to copy from
scansize - The number of pixel values between rows

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      java.awt.image.ColorModel model,
                      int[] pixels,
                      int offset,
                      int scansize)
Notification of a bunch of pixel values as ints. These will be full 3 or 4 component images.

Specified by:
setPixels in interface java.awt.image.ImageConsumer
Parameters:
x - The starting x position of the pixels
y - The starting y position of the pixels
w - The number of pixels in the width
h - The number of pixels in the height
model - The color model used with these pixel values
offset - The offset into the source array to copy from
scansize - The number of pixel values between rows

setProperties

public void setProperties(java.util.Hashtable props)
Notification of the properties of the image to use. Not used in this implementation.

Specified by:
setProperties in interface java.awt.image.ImageConsumer
Parameters:
props - The map of properties for this image

getImage

public java.awt.image.BufferedImage getImage()
Fetch the image. This image is not necessarily completely rendered although we do try to guarantee it. Torsten Römer: Changed to public

Returns:
The image that has been created for the current input


Copyright © 2008 Atlassian Software Systems Pty Ltd. All Rights Reserved.