API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt.image. MemoryImageSource View Source
Author(s)
Jim Graham
Animation capabilities inspired by the MemoryAnimationSource class written by Garth Dickie
Since
Version
1.34 11/17/05
Serial
Hierarchy
 Object
      MemoryImageSource
Implements
 ImageProducer
Subclasses
Description
public class MemoryImageSource
  This class is an implementation of the ImageProducer interface which uses an array to produce pixel values for an Image.
See also:    ImageProducer
Constructors
public MemoryImageSource (int w, int h, ColorModel cm, byte[] pix, int off, int scan)
  Constructs an ImageProducer object which uses an array of bytes to produce data for an Image object.
public MemoryImageSource (int w, int h, ColorModel cm, byte[] pix, int off, int scan, Hashtable<Object, Object> props)
  Constructs an ImageProducer object which uses an array of bytes to produce data for an Image object.
public MemoryImageSource (int w, int h, ColorModel cm, int[] pix, int off, int scan)
  Constructs an ImageProducer object which uses an array of integers to produce data for an Image object.
public MemoryImageSource (int w, int h, ColorModel cm, int[] pix, int off, int scan, Hashtable<Object, Object> props)
  Constructs an ImageProducer object which uses an array of integers to produce data for an Image object.
public MemoryImageSource (int w, int h, int[] pix, int off, int scan)
  Constructs an ImageProducer object which uses an array of integers in the default RGB ColorModel to produce data for an Image object.
public MemoryImageSource (int w, int h, int[] pix, int off, int scan, Hashtable<Object, Object> props)
  Constructs an ImageProducer object which uses an array of integers in the default RGB ColorModel to produce data for an Image object.
Methods
Hide/Show inherited methods
publicsynchronized void addConsumer (ImageConsumer ic) [Specified in ImageProducer]
  Adds an ImageConsumer to the list of consumers interested in data for this image.
publicsynchronized boolean isConsumer (ImageConsumer ic) [Specified in ImageProducer]
  Determines if an ImageConsumer is on the list of consumers currently interested in data for this image.
public void newPixels ()
  Sends a whole new buffer of pixels to any ImageConsumers that are currently interested in the data for this image and notify them that an animation frame is complete.
publicsynchronized void newPixels (byte[] newpix, ColorModel newmodel, int offset, int scansize)
  Changes to a new byte array to hold the pixels for this image.
publicsynchronized void newPixels (int[] newpix, ColorModel newmodel, int offset, int scansize)
  Changes to a new int array to hold the pixels for this image.
publicsynchronized void newPixels (int x, int y, int w, int h)
  Sends a rectangular region of the buffer of pixels to any ImageConsumers that are currently interested in the data for this image and notify them that an animation frame is complete.
publicsynchronized void newPixels (int x, int y, int w, int h, boolean framenotify)
  Sends a rectangular region of the buffer of pixels to any ImageConsumers that are currently interested in the data for this image.
publicsynchronized void removeConsumer (ImageConsumer ic) [Specified in ImageProducer]
  Removes an ImageConsumer from the list of consumers interested in data for this image.
public void requestTopDownLeftRightResend (ImageConsumer ic) [Specified in ImageProducer]
  Requests that a given ImageConsumer have the image data delivered one more time in top-down, left-right order.
publicsynchronized void setAnimated (boolean animated)
  Changes this memory image into a multi-frame animation or a single-frame static image depending on the animated parameter.
publicsynchronized void setFullBufferUpdates (boolean fullbuffers)
  Specifies whether this animated memory image should always be updated by sending the complete buffer of pixels whenever there is a change.
public void startProduction (ImageConsumer ic) [Specified in ImageProducer]
  Adds an ImageConsumer to the list of consumers interested in data for this image and immediately starts delivery of the image data through the ImageConsumer interface.
Fields
Hide/Show inherited fields
pack-private boolean animating
pack-private boolean fullbuffers
pack-private int height
pack-private ColorModel model
pack-private int pixeloffset
pack-private Object pixels
pack-private int pixelscan
pack-private Hashtable properties
pack-private Vector theConsumers
pack-private int width
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar