|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.jimi.core.raster.JimiRasterImageSupport
Base support class for implementations of JimiRasterImage derivatives. Primarily provides support for ImageProducer functionality.
Field Summary | |
protected boolean |
abort
|
protected java.awt.image.ColorModel |
colorModel
color model for interpreting image data |
protected boolean |
error
|
protected boolean |
finished
set to true when a full frame of image data is set, when there are is no unset data |
protected boolean |
forceRGB
|
protected boolean |
modified
set to true after first modification |
protected boolean |
newFrameData
true if new data has been set since a frame was completed |
protected boolean |
productionAllowed
set to true when production is allowed to be started |
protected boolean |
productionStarted
set to true when some image data is set |
protected java.util.Hashtable |
properties
|
protected int[] |
rowBuf
|
protected java.awt.image.ColorModel |
sourceColorModel
|
protected boolean |
waitForOptions
|
Constructor Summary | |
protected |
JimiRasterImageSupport(int w,
int h,
java.awt.image.ColorModel cm)
Construct the storage with given dimensions |
Method Summary | |
void |
addConsumer(java.awt.image.ImageConsumer consumer)
Add a new consumer. |
protected void |
addDirectConsumer(java.awt.image.ImageConsumer consumer)
|
protected void |
addWaitingConsumer(java.awt.image.ImageConsumer consumer)
|
protected boolean |
catchupConsumer(java.awt.image.ImageConsumer consumer)
Default implementation, does not attempt to catch up and returns failure. |
protected java.awt.image.ColorModel |
getAppropriateColorModel(java.awt.image.ColorModel cm)
Return a ColorModel appropriate for use with image production. |
void |
getChannelRectangle(int channel,
int x,
int y,
int width,
int height,
byte[] buffer,
int offset,
int scansize)
|
void |
getChannelRow(int channel,
int y,
byte[] buffer,
int offset)
|
java.awt.image.ColorModel |
getColorModel()
|
java.awt.image.ImageProducer |
getCroppedImageProducer(int x,
int y,
int width,
int height)
|
protected MulticastImageConsumer |
getDirectConsumer()
|
JimiImageFactory |
getFactory()
Get the JimiImageFactory this image was created by. |
int |
getHeight()
Get the height of the storage space. |
java.awt.image.ImageProducer |
getImageProducer()
Get an ImageProducer to send image data from the storage. |
FormatOptionSet |
getOptions()
Get the FormatOptionSet associated with the image. |
java.util.Hashtable |
getProperties()
|
void |
getRectangleARGBChannels(int x,
int y,
int width,
int height,
byte[] buffer,
int offset,
int scansize)
|
void |
getRectangleRGBAChannels(int x,
int y,
int width,
int height,
byte[] buffer,
int offset,
int scansize)
|
void |
getRectangleRGBChannels(int x,
int y,
int width,
int height,
byte[] buffer,
int offset,
int scansize)
|
int |
getWidth()
Get the width of the storage space. |
protected boolean |
hasDirectConsumer()
|
protected void |
initConsumer(java.awt.image.ImageConsumer consumer)
|
boolean |
isConsumer(java.awt.image.ImageConsumer consumer)
|
boolean |
isError()
Check whether the image has been marked as an error. |
boolean |
mustWaitForOptions()
|
void |
produceCroppedImage(java.awt.image.ImageConsumer consumer,
java.awt.Rectangle region)
|
void |
removeConsumer(java.awt.image.ImageConsumer consumer)
|
void |
requestTopDownLeftRightResend(java.awt.image.ImageConsumer consumer)
|
protected abstract void |
sendRegionToConsumerFully(java.awt.image.ImageConsumer consumer,
java.awt.Rectangle region)
|
protected abstract void |
sendToConsumerFully(java.awt.image.ImageConsumer consumer)
|
void |
setColorModel(java.awt.image.ColorModel cm)
Set the source ColorModel of the image. |
void |
setDecodingController(JimiDecodingController controller)
|
void |
setError()
Declare that the image is an error, and should not be used. |
void |
setFactory(JimiImageFactory factory)
Set the factory which the image belongs to. |
void |
setFinished()
Signal that the image is complete. |
void |
setImageConsumerHints(int hints)
Set hints about how the data will be delivered. |
protected void |
setModified()
|
void |
setOptions(FormatOptionSet options)
Associate a FormatOptionSet with the image. |
void |
setWaitForOptions(boolean wait)
|
void |
startProduction(java.awt.image.ImageConsumer consumer)
|
void |
waitFinished()
|
void |
waitInfoAvailable()
Required information is known from creation time, so no need to wait. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected boolean error
protected boolean abort
protected boolean productionStarted
protected boolean modified
protected boolean productionAllowed
protected boolean finished
protected boolean newFrameData
protected java.awt.image.ColorModel colorModel
protected java.util.Hashtable properties
protected java.awt.image.ColorModel sourceColorModel
protected boolean forceRGB
protected int[] rowBuf
protected boolean waitForOptions
Constructor Detail |
protected JimiRasterImageSupport(int w, int h, java.awt.image.ColorModel cm)
w
- width in pixels of storage spaceh
- height in pixels of storage spacecm
- the ColorModel to useMethod Detail |
public int getWidth()
public int getHeight()
public void setColorModel(java.awt.image.ColorModel cm)
public void setImageConsumerHints(int hints)
java.awt.ImageConsumer
public boolean isError()
public void setError()
public void setFactory(JimiImageFactory factory)
public JimiImageFactory getFactory()
public void setOptions(FormatOptionSet options)
public FormatOptionSet getOptions()
public void setFinished()
public void waitInfoAvailable()
public void waitFinished()
public void setDecodingController(JimiDecodingController controller)
public void addConsumer(java.awt.image.ImageConsumer consumer)
consumer
- the consumerprotected void addDirectConsumer(java.awt.image.ImageConsumer consumer)
protected void addWaitingConsumer(java.awt.image.ImageConsumer consumer)
protected boolean catchupConsumer(java.awt.image.ImageConsumer consumer)
public java.awt.image.ImageProducer getImageProducer()
public boolean isConsumer(java.awt.image.ImageConsumer consumer)
public void removeConsumer(java.awt.image.ImageConsumer consumer)
public void startProduction(java.awt.image.ImageConsumer consumer)
public void requestTopDownLeftRightResend(java.awt.image.ImageConsumer consumer)
public java.awt.image.ColorModel getColorModel()
public java.util.Hashtable getProperties()
public java.awt.image.ImageProducer getCroppedImageProducer(int x, int y, int width, int height)
public void produceCroppedImage(java.awt.image.ImageConsumer consumer, java.awt.Rectangle region)
protected MulticastImageConsumer getDirectConsumer()
protected boolean hasDirectConsumer()
protected abstract void sendToConsumerFully(java.awt.image.ImageConsumer consumer) throws ImageAccessException
protected abstract void sendRegionToConsumerFully(java.awt.image.ImageConsumer consumer, java.awt.Rectangle region) throws ImageAccessException
protected void initConsumer(java.awt.image.ImageConsumer consumer)
protected java.awt.image.ColorModel getAppropriateColorModel(java.awt.image.ColorModel cm)
protected void setModified()
public void getChannelRectangle(int channel, int x, int y, int width, int height, byte[] buffer, int offset, int scansize) throws ImageAccessException
public void getChannelRow(int channel, int y, byte[] buffer, int offset) throws ImageAccessException
public void getRectangleRGBChannels(int x, int y, int width, int height, byte[] buffer, int offset, int scansize) throws ImageAccessException
public void getRectangleARGBChannels(int x, int y, int width, int height, byte[] buffer, int offset, int scansize) throws ImageAccessException
public void getRectangleRGBAChannels(int x, int y, int width, int height, byte[] buffer, int offset, int scansize) throws ImageAccessException
public void setWaitForOptions(boolean wait)
public boolean mustWaitForOptions()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |