edu.umd.cfar.lamp.viper.gui.players
Class ByteBufferAsIntBufferSource
java.lang.Object
edu.umd.cfar.lamp.viper.gui.players.ByteBufferAsIntBufferSource
- All Implemented Interfaces:
- java.awt.image.ImageProducer
- public class ByteBufferAsIntBufferSource
- extends java.lang.Object
- implements java.awt.image.ImageProducer
Method Summary |
void |
addConsumer(java.awt.image.ImageConsumer ic)
Adds an ImageConsumer to the list of consumers interested in
data for this image. |
boolean |
isConsumer(java.awt.image.ImageConsumer ic)
|
void |
newPixels()
|
void |
newPixels(java.nio.ByteBuffer newpix,
java.awt.image.ColorModel newmodel)
Changes to a new byte array to hold the pixels for this image.
|
void |
newPixels(int x,
int y,
int w,
int h)
|
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.
|
void |
removeConsumer(java.awt.image.ImageConsumer ic)
|
void |
requestTopDownLeftRightResend(java.awt.image.ImageConsumer ic)
|
void |
setAnimated(boolean animated)
|
void |
setFullBufferUpdates(boolean fullbuffers)
|
void |
startProduction(java.awt.image.ImageConsumer ic)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ByteBufferAsIntBufferSource
public ByteBufferAsIntBufferSource(int w,
int h,
java.awt.image.ColorModel cm,
java.nio.ByteBuffer pix)
addConsumer
public void addConsumer(java.awt.image.ImageConsumer ic)
- Adds an ImageConsumer to the list of consumers interested in
data for this image.
- Specified by:
addConsumer
in interface java.awt.image.ImageProducer
- Parameters:
ic
- the specified ImageConsumer
- See Also:
ImageConsumer
isConsumer
public boolean isConsumer(java.awt.image.ImageConsumer ic)
- Specified by:
isConsumer
in interface java.awt.image.ImageProducer
removeConsumer
public void removeConsumer(java.awt.image.ImageConsumer ic)
- Specified by:
removeConsumer
in interface java.awt.image.ImageProducer
startProduction
public void startProduction(java.awt.image.ImageConsumer ic)
- Specified by:
startProduction
in interface java.awt.image.ImageProducer
requestTopDownLeftRightResend
public void requestTopDownLeftRightResend(java.awt.image.ImageConsumer ic)
- Specified by:
requestTopDownLeftRightResend
in interface java.awt.image.ImageProducer
setAnimated
public void setAnimated(boolean animated)
setFullBufferUpdates
public void setFullBufferUpdates(boolean fullbuffers)
newPixels
public void newPixels()
newPixels
public void newPixels(int x,
int y,
int w,
int h)
newPixels
public 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.
If the framenotify parameter is true then the consumers are
also notified that an animation frame is complete.
This method only has effect if the animation flag has been
turned on through the setAnimated() method.
If the full buffer update flag was turned on with the
setFullBufferUpdates() method then the rectangle parameters
will be ignored and the entire buffer will always be sent.
- Parameters:
x
- the x coordinate of the upper left corner of the rectangle
of pixels to be senty
- the y coordinate of the upper left corner of the rectangle
of pixels to be sentw
- the width of the rectangle of pixels to be senth
- the height of the rectangle of pixels to be sentframenotify
- true
if the consumers should be sent a
SINGLEFRAMEDONE
notification- See Also:
ImageConsumer
,
setAnimated(boolean)
,
setFullBufferUpdates(boolean)
newPixels
public void newPixels(java.nio.ByteBuffer newpix,
java.awt.image.ColorModel newmodel)
- Changes to a new byte array to hold the pixels for this image.
If the animation flag has been turned on through the setAnimated()
method, then the new pixels will be immediately delivered to any
ImageConsumers that are currently interested in the data for
this image.
- Parameters:
newpix
- the new pixel arraynewmodel
- the specified ColorModel
- See Also:
newPixels(int, int, int, int, boolean)
,
setAnimated(boolean)