APIdia Launch Partner
Top Fields Constructors Methods
sun.awt.image

public Class ImageRepresentation

extends ImageWatched
implements ImageConsumer
Class Inheritance
All Implemented Interfaces
java.awt.image.ImageConsumer
Imports
java.awt.Color, .Graphics, .Graphics2D, .Rectangle, .Transparency, java.awt.geom.AffineTransform, java.awt.image.BufferedImage, .ColorModel, .DataBuffer, .DataBufferInt, .DirectColorModel, .ImageConsumer, .ImageObserver, .IndexColorModel, .Raster, .WritableRaster, java.util.Hashtable

Field Summary

Modifier and TypeField and Description
pack-priv int
pack-priv BufferedImage
pack-priv WritableRaster
protected ColorModel
private boolean
pack-priv boolean
pack-priv int
pack-priv int
pack-priv ToolkitImage
pack-priv boolean
pack-priv boolean
pack-priv Rectangle
pack-priv int
private int
pack-priv long
pack-priv static boolean
pack-priv InputStreamImageSource
pack-priv int[]
pack-priv int
pack-priv ColorModel
pack-priv int
pack-priv int
pack-priv int
Inherited from sun.awt.image.ImageWatched:
endlinkwatcherList

Constructor Summary

AccessConstructor and Description
public
ImageRepresentation(ToolkitImage im, ColorModel cmodel, boolean forceCMhint)

Create an ImageRepresentation for the given Image.

Method Summary

Modifier and TypeMethod and Description
pack-priv synchronized void
public int
private synchronized void
private void
pack-priv void
protected BufferedImage
createImage(ColorModel cm, WritableRaster raster, boolean isRasterPremultiplied, Hashtable<?, ?> properties)

Returns the BufferedImage that will be used as the representation of the pixel data.

private synchronized void
pack-priv synchronized void
public boolean
drawToBufImage(Graphics g, ToolkitImage img, int x, int y, Color bg, ImageObserver iw)

public boolean
drawToBufImage(Graphics g, ToolkitImage img, int x, int y, int w, int h, Color bg, ImageObserver iw)

public boolean
drawToBufImage(Graphics g, ToolkitImage img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bg, ImageObserver iw)

public boolean
pack-priv BufferedImage
pack-priv ColorModel
public int
public BufferedImage
public int
public void
imageComplete(int status)

Implements java.awt.image.ImageConsumer.imageComplete.

The imageComplete method is called when the ImageProducer is finished delivering all of the pixels that the source image contains, or when a single frame of a multi-frame animation has been completed, or when an error in loading or producing the image has occurred.

private static native void
public synchronized void
public boolean
public synchronized void
reconstruct(int flags)

public void
setAccelerationPriority(float priority)

public void
setColorModel(ColorModel model)

Implements java.awt.image.ImageConsumer.setColorModel.

Sets the ColorModel object used for the majority of the pixels reported using the setPixels method calls.

private native boolean
setDiffICM(int x, int y, int w, int h, int[] lut, int transPix, int numLut, IndexColorModel icm, byte[] pix, int off, int scansize, ByteComponentRaster bct, int chanOff)

public void
setDimensions(int w, int h)

Implements java.awt.image.ImageConsumer.setDimensions.

The dimensions of the source image are reported using the setDimensions method call.

public void
setHints(int h)

Implements java.awt.image.ImageConsumer.setHints.

Sets the hints that the ImageConsumer uses to process the pixels delivered by the ImageProducer.

private native boolean
setICMpixels(int x, int y, int w, int h, int[] lut, byte[] pix, int off, int scansize, IntegerComponentRaster ict)

public void
setPixels(int x, int y, int w, int h, ColorModel model, byte[] pix, int off, int scansize)

Implements java.awt.image.ImageConsumer.setPixels.

Delivers the pixels of the image with one or more calls to this method.

public void
setPixels(int x, int y, int w, int h, ColorModel model, int[] pix, int off, int scansize)

Implements java.awt.image.ImageConsumer.setPixels.

The pixels of the image are delivered using one or more calls to the setPixels method.

public void
setProperties(Hashtable<?, ?> props)

Implements java.awt.image.ImageConsumer.setProperties.

Sets the extensible list of properties associated with this image.

pack-priv void
Inherited from sun.awt.image.ImageWatched:
addWatcherisWatcherisWatcherListEmptynewInforemoveWatcher

Field Detail

availinfoback to summary
pack-priv int availinfo
bimageback to summary
pack-priv BufferedImage bimage
biRasterback to summary
pack-priv WritableRaster biRaster
cmodelback to summary
protected ColorModel cmodel
consumingback to summary
private boolean consuming
forceCMhintback to summary
pack-priv boolean forceCMhint
heightback to summary
pack-priv int height
hintsback to summary
pack-priv int hints
imageback to summary
pack-priv ToolkitImage image
isDefaultBIback to summary
pack-priv boolean isDefaultBI
isSameCMback to summary
pack-priv boolean isSameCM
newbitsback to summary
pack-priv Rectangle newbits
numSrcLUTback to summary
pack-priv int numSrcLUT
numWaitersback to summary
private int numWaiters
pDataback to summary
pack-priv long pData
s_useNativeback to summary
pack-priv static boolean s_useNative
srcback to summary
pack-priv InputStreamImageSource src
srcLUTback to summary
pack-priv int[] srcLUT
srcLUTtransIndexback to summary
pack-priv int srcLUTtransIndex
srcModelback to summary
pack-priv ColorModel srcModel
sstrideback to summary
pack-priv int sstride
tagback to summary
pack-priv int tag
widthback to summary
pack-priv int width

Constructor Detail

ImageRepresentationback to summary
public ImageRepresentation(ToolkitImage im, ColorModel cmodel, boolean forceCMhint)

Create an ImageRepresentation for the given Image. The width and height are unknown at this point. The color model is a hint as to the color model to use when creating the buffered image. If null, the src color model will be used.

Method Detail

abortback to summary
pack-priv synchronized void abort()
checkback to summary
public int check(ImageObserver iw)
checkConsumptionback to summary
private synchronized void checkConsumption()
convertToRGBback to summary
private void convertToRGB()
createBufferedImageback to summary
pack-priv void createBufferedImage()
createImageback to summary
protected BufferedImage createImage(ColorModel cm, WritableRaster raster, boolean isRasterPremultiplied, Hashtable<?, ?> properties)

Returns the BufferedImage that will be used as the representation of the pixel data. Subclasses can override this method to return platform specific subclasses of BufferedImage that may or may not be accelerated. It is subclass' responsibility to propagate acceleration priority to the newly created image.

decrementWaitersback to summary
private synchronized void decrementWaiters()
disposeback to summary
pack-priv synchronized void dispose()
drawToBufImageback to summary
public boolean drawToBufImage(Graphics g, ToolkitImage img, int x, int y, Color bg, ImageObserver iw)
drawToBufImageback to summary
public boolean drawToBufImage(Graphics g, ToolkitImage img, int x, int y, int w, int h, Color bg, ImageObserver iw)
drawToBufImageback to summary
public boolean drawToBufImage(Graphics g, ToolkitImage img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bg, ImageObserver iw)
drawToBufImageback to summary
public boolean drawToBufImage(Graphics g, ToolkitImage img, AffineTransform xform, ImageObserver iw)
getBufferedImageback to summary
pack-priv BufferedImage getBufferedImage()
getColorModelback to summary
pack-priv ColorModel getColorModel()
getHeightback to summary
public int getHeight()
getOpaqueRGBImageback to summary
public BufferedImage getOpaqueRGBImage()
getWidthback to summary
public int getWidth()
imageCompleteback to summary
public void imageComplete(int status)

Implements java.awt.image.ImageConsumer.imageComplete.

Doc from java.awt.image.ImageConsumer.imageComplete.

The imageComplete method is called when the ImageProducer is finished delivering all of the pixels that the source image contains, or when a single frame of a multi-frame animation has been completed, or when an error in loading or producing the image has occurred. The ImageConsumer should remove itself from the list of consumers registered with the ImageProducer at this time, unless it is interested in successive frames.

initIDsback to summary
private static native void initIDs()
notifyWatcherListEmptyback to summary
public synchronized void notifyWatcherListEmpty()

Implements abstract sun.awt.image.ImageWatched.notifyWatcherListEmpty.

prepareback to summary
public boolean prepare(ImageObserver iw)
reconstructback to summary
public synchronized void reconstruct(int flags)
setAccelerationPriorityback to summary
public void setAccelerationPriority(float priority)
setColorModelback to summary
public void setColorModel(ColorModel model)

Implements java.awt.image.ImageConsumer.setColorModel.

Doc from java.awt.image.ImageConsumer.setColorModel.

Sets the ColorModel object used for the majority of the pixels reported using the setPixels method calls. Note that each set of pixels delivered using setPixels contains its own ColorModel object, so no assumption should be made that this model will be the only one used in delivering pixel values. A notable case where multiple ColorModel objects may be seen is a filtered image when for each set of pixels that it filters, the filter determines whether the pixels can be sent on untouched, using the original ColorModel, or whether the pixels should be modified (filtered) and passed on using a ColorModel more convenient for the filtering process.

setDiffICMback to summary
private native boolean setDiffICM(int x, int y, int w, int h, int[] lut, int transPix, int numLut, IndexColorModel icm, byte[] pix, int off, int scansize, ByteComponentRaster bct, int chanOff)
setDimensionsback to summary
public void setDimensions(int w, int h)

Implements java.awt.image.ImageConsumer.setDimensions.

Doc from java.awt.image.ImageConsumer.setDimensions.

The dimensions of the source image are reported using the setDimensions method call.

setHintsback to summary
public void setHints(int h)

Implements java.awt.image.ImageConsumer.setHints.

Doc from java.awt.image.ImageConsumer.setHints.

Sets the hints that the ImageConsumer uses to process the pixels delivered by the ImageProducer. The ImageProducer can deliver the pixels in any order, but the ImageConsumer may be able to scale or convert the pixels to the destination ColorModel more efficiently or with higher quality if it knows some information about how the pixels will be delivered up front. The setHints method should be called before any calls to any of the setPixels methods with a bit mask of hints about the manner in which the pixels will be delivered. If the ImageProducer does not follow the guidelines for the indicated hint, the results are undefined.

setICMpixelsback to summary
private native boolean setICMpixels(int x, int y, int w, int h, int[] lut, byte[] pix, int off, int scansize, IntegerComponentRaster ict)
setPixelsback to summary
public void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pix, int off, int scansize)

Implements java.awt.image.ImageConsumer.setPixels.

Doc from java.awt.image.ImageConsumer.setPixels.

Delivers the pixels of the image with one or more calls to this method. Each call specifies the location and size of the rectangle of source pixels that are contained in the array of pixels. The specified ColorModel object should be used to convert the pixels into their corresponding color and alpha components. Pixel (m,n) is stored in the pixels array at index (n * scansize + m + off). The pixels delivered using this method are all stored as bytes.

setPixelsback to summary
public void setPixels(int x, int y, int w, int h, ColorModel model, int[] pix, int off, int scansize)

Implements java.awt.image.ImageConsumer.setPixels.

Doc from java.awt.image.ImageConsumer.setPixels.

The pixels of the image are delivered using one or more calls to the setPixels method. Each call specifies the location and size of the rectangle of source pixels that are contained in the array of pixels. The specified ColorModel object should be used to convert the pixels into their corresponding color and alpha components. Pixel (m,n) is stored in the pixels array at index (n * scansize + m + off). The pixels delivered using this method are all stored as ints. this method are all stored as ints.

setPropertiesback to summary
public void setProperties(Hashtable<?, ?> props)

Implements java.awt.image.ImageConsumer.setProperties.

Doc from java.awt.image.ImageConsumer.setProperties.

Sets the extensible list of properties associated with this image.

startProductionback to summary
pack-priv void startProduction()