Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.awt.image

Class MemoryImageSource

java.lang.Object
|
+--java.awt.image.MemoryImageSource

All Implemented Interfaces:

ImageProducer


public class MemoryImageSource

extends Object

implements ImageProducer

Constructor Summary

MemoryImageSource(int w, int h, java.awt.image.ColorModel cm, byte[] pix, int off, int scan)

Constructs an ImageProducer from memory
MemoryImageSource(int w, int h, java.awt.image.ColorModel cm, byte[] pix, int off, int scan, java.util.Hashtable props)

Constructs an ImageProducer from memory
MemoryImageSource(int w, int h, java.awt.image.ColorModel cm, int[] pix, int off, int scan)

Constructs an ImageProducer from memory
MemoryImageSource(int w, int h, java.awt.image.ColorModel cm, int[] pix, int off, int scan, java.util.Hashtable props)

Constructs an ImageProducer from memory
MemoryImageSource(int w, int h, int[] pix, int off, int scan, java.util.Hashtable props)

Constructs an ImageProducer from memory using the default RGB ColorModel
MemoryImageSource(int w, int h, int[] pix, int off, int scan)

Constructs an ImageProducer from memory using the default RGB ColorModel

Method Summary

synchronized voidaddConsumer(java.awt.image.ImageConsumer ic)

Used to register an ImageConsumer with this ImageProducer.
synchronized booleanisConsumer(java.awt.image.ImageConsumer ic)

Used to determine if the given ImageConsumer is already registered with this ImageProducer.
voidnewPixels()

Send an animation frame to the image consumers.
synchronized voidnewPixels(int x, int y, int w, int h)

Send an animation frame to the image consumers containing the specified pixels unless setFullBufferUpdates is set.
synchronized voidnewPixels(int x, int y, int w, int h, boolean framenotify)

Send an animation frame to the image consumers containing the specified pixels unless setFullBufferUpdates is set.
synchronized voidnewPixels(byte[] newpix, java.awt.image.ColorModel newmodel, int offset, int scansize)

synchronized voidnewPixels(int[] newpix, java.awt.image.ColorModel newmodel, int offset, int scansize)

synchronized voidremoveConsumer(java.awt.image.ImageConsumer ic)

Used to remove an ImageConsumer from the list of registered consumers for this ImageProducer.
voidrequestTopDownLeftRightResend(java.awt.image.ImageConsumer ic)

Used to register an ImageConsumer with this ImageProducer and then request that this producer resend the image data in the order top-down, left-right.
synchronized voidsetAnimated(boolean animated)

Changes a flag to indicate whether this MemoryImageSource supports animations.
synchronized voidsetFullBufferUpdates(boolean fullbuffers)

A flag to indicate whether or not to send full buffer updates when sending animation.
voidstartProduction(java.awt.image.ImageConsumer ic)

Used to register an ImageConsumer with this ImageProducer and then immediately start reconstruction of the image data to be delivered to all registered consumers.

Constructor Details

MemoryImageSource

public MemoryImageSource(int w, int h, int[] pix, int off, int scan)

Constructs an ImageProducer from memory using the default RGB ColorModel

Parameters:


MemoryImageSource

public MemoryImageSource(int w, int h, int[] pix, int off, int scan, java.util.Hashtable props)

Constructs an ImageProducer from memory using the default RGB ColorModel

Parameters:


MemoryImageSource

public MemoryImageSource(int w, int h, java.awt.image.ColorModel cm, byte[] pix, int off, int scan)

Constructs an ImageProducer from memory

Parameters:


MemoryImageSource

public MemoryImageSource(int w, int h, java.awt.image.ColorModel cm, byte[] pix, int off, int scan, java.util.Hashtable props)

Constructs an ImageProducer from memory

Parameters:


MemoryImageSource

public MemoryImageSource(int w, int h, java.awt.image.ColorModel cm, int[] pix, int off, int scan)

Constructs an ImageProducer from memory

Parameters:


MemoryImageSource

public MemoryImageSource(int w, int h, java.awt.image.ColorModel cm, int[] pix, int off, int scan, java.util.Hashtable props)

Constructs an ImageProducer from memory

Parameters:


Method Details

addConsumer

public synchronized void addConsumer(java.awt.image.ImageConsumer ic)

Used to register an ImageConsumer with this ImageProducer.

Parameters:


isConsumer

public synchronized boolean isConsumer(java.awt.image.ImageConsumer ic)

Used to determine if the given ImageConsumer is already registered with this ImageProducer.

Parameters:


newPixels

public void newPixels()

Send an animation frame to the image consumers.


newPixels

public synchronized void newPixels(byte[] newpix, java.awt.image.ColorModel newmodel, int offset, int scansize)

Parameters:


newPixels

public synchronized void newPixels(int x, int y, int w, int h)

Send an animation frame to the image consumers containing the specified pixels unless setFullBufferUpdates is set.

Parameters:


newPixels

public synchronized void newPixels(int x, int y, int w, int h, boolean framenotify)

Send an animation frame to the image consumers containing the specified pixels unless setFullBufferUpdates is set. If framenotify is set then a notification is sent when the frame is sent otherwise no status is sent.

Parameters:


newPixels

public synchronized void newPixels(int[] newpix, java.awt.image.ColorModel newmodel, int offset, int scansize)

Parameters:


removeConsumer

public synchronized void removeConsumer(java.awt.image.ImageConsumer ic)

Used to remove an ImageConsumer from the list of registered consumers for this ImageProducer.

Parameters:


requestTopDownLeftRightResend

public void requestTopDownLeftRightResend(java.awt.image.ImageConsumer ic)

Used to register an ImageConsumer with this ImageProducer and then request that this producer resend the image data in the order top-down, left-right.

Parameters:


setAnimated

public synchronized void setAnimated(boolean animated)

Changes a flag to indicate whether this MemoryImageSource supports animations.

Parameters:


setFullBufferUpdates

public synchronized void setFullBufferUpdates(boolean fullbuffers)

A flag to indicate whether or not to send full buffer updates when sending animation. If this flag is set then full buffers are sent in the newPixels methods instead of just regions.

Parameters:


startProduction

public void startProduction(java.awt.image.ImageConsumer ic)

Used to register an ImageConsumer with this ImageProducer and then immediately start reconstruction of the image data to be delivered to all registered consumers.

Parameters: