public class ColorCyclingMemoryImageSource extends MemoryImageSource
| Constructor and Description |
|---|
ColorCyclingMemoryImageSource(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.
|
ColorCyclingMemoryImageSource(int w,
int h,
ColorModel cm,
byte[] pix,
int off,
int scan,
Hashtable<?,?> props)
Constructs an ImageProducer object which uses an array of bytes
to produce data for an Image object.
|
ColorCyclingMemoryImageSource(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.
|
ColorCyclingMemoryImageSource(int w,
int h,
ColorModel cm,
int[] pix,
int off,
int scan,
Hashtable<?,?> props)
Constructs an ImageProducer object which uses an array of integers
to produce data for an Image object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addColorCycle(ColorCycle cc) |
void |
addConsumer(ImageConsumer ic) |
ColorModel |
getColorModel() |
int |
getHeight() |
Hashtable |
getProperties() |
int |
getWidth() |
boolean |
isBlendedColorCycling() |
boolean |
isColorCyclingAvailable() |
boolean |
isColorCyclingStarted()
Returns true if color cycling is on.
|
boolean |
isStarted() |
void |
newPixels(byte[] newpix,
ColorModel newmodel,
int offset,
int scansize) |
void |
newPixels(int[] newpix,
ColorModel newmodel,
int offset,
int scansize)
Changes to a new int array to hold the pixels for this image.
|
void |
putProperties(Hashtable props) |
void |
removeConsumer(ImageConsumer ic) |
void |
setAnimated(boolean b) |
void |
setBlendedColorCycling(boolean newValue) |
void |
setColorCyclingStarted(boolean b)
Starts or stops color cycling.
|
void |
start()
Starts color cycling.
|
void |
stop()
Stops color cycling.
|
BufferedImage |
toBufferedImage()
Creates a BufferedImage which shares its pixel data with this memory image source.
|
isConsumer, newPixels, newPixels, newPixels, requestTopDownLeftRightResend, setFullBufferUpdates, startProductionpublic ColorCyclingMemoryImageSource(int w,
int h,
ColorModel cm,
byte[] pix,
int off,
int scan)
w - the width of the rectangle of pixelsh - the height of the rectangle of pixelscm - the specified ColorModelpix - an array of pixelsoff - the offset into the array of where to store the
first pixelscan - the distance from one row of pixels to the next in
the arrayComponent.createImage(java.awt.image.ImageProducer)public ColorCyclingMemoryImageSource(int w,
int h,
ColorModel cm,
byte[] pix,
int off,
int scan,
Hashtable<?,?> props)
w - the width of the rectangle of pixelsh - the height of the rectangle of pixelscm - the specified ColorModelpix - an array of pixelsoff - the offset into the array of where to store the
first pixelscan - the distance from one row of pixels to the next in
the arrayprops - a list of properties that the ImageProducer
uses to process an imageComponent.createImage(java.awt.image.ImageProducer)public ColorCyclingMemoryImageSource(int w,
int h,
ColorModel cm,
int[] pix,
int off,
int scan)
w - the width of the rectangle of pixelsh - the height of the rectangle of pixelscm - the specified ColorModelpix - an array of pixelsoff - the offset into the array of where to store the
first pixelscan - the distance from one row of pixels to the next in
the arrayComponent.createImage(java.awt.image.ImageProducer)public ColorCyclingMemoryImageSource(int w,
int h,
ColorModel cm,
int[] pix,
int off,
int scan,
Hashtable<?,?> props)
w - the width of the rectangle of pixelsh - the height of the rectangle of pixelscm - the specified ColorModelpix - an array of pixelsoff - the offset into the array of where to store the
first pixelscan - the distance from one row of pixels to the next in
the arrayprops - a list of properties that the ImageProducer
uses to process an imageComponent.createImage(java.awt.image.ImageProducer)public int getWidth()
public int getHeight()
public ColorModel getColorModel()
public Hashtable getProperties()
public void newPixels(byte[] newpix,
ColorModel newmodel,
int offset,
int scansize)
newPixels in class MemoryImageSourcepublic void newPixels(int[] newpix,
ColorModel newmodel,
int offset,
int scansize)
newPixels in class MemoryImageSourcenewpix - the new pixel arraynewmodel - the specified ColorModeloffset - the offset into the arrayscansize - the distance from one row of pixels to the next in
the arrayMemoryImageSource.newPixels(int, int, int, int, boolean),
setAnimated(boolean)public void addColorCycle(ColorCycle cc)
public void addConsumer(ImageConsumer ic)
addConsumer in interface ImageProduceraddConsumer in class MemoryImageSourcepublic void removeConsumer(ImageConsumer ic)
removeConsumer in interface ImageProducerremoveConsumer in class MemoryImageSourcepublic void setAnimated(boolean b)
setAnimated in class MemoryImageSourcepublic void setColorCyclingStarted(boolean b)
public boolean isColorCyclingStarted()
public void start()
public void stop()
public boolean isStarted()
public BufferedImage toBufferedImage()
public boolean isColorCyclingAvailable()
public void putProperties(Hashtable props)
public void setBlendedColorCycling(boolean newValue)
public boolean isBlendedColorCycling()
Copyright © 2014. All Rights Reserved.