com.sun.jimi.core
Class JimiImageHandle

java.lang.Object
  |
  +--com.sun.jimi.core.JimiImageHandle
Direct Known Subclasses:
JimiRasterImageHandle

public class JimiImageHandle
extends java.lang.Object
implements JimiImage

A proxy which acts as a Future for JimiImages which have not yet been created. Operations requiring immediate access to the image are blocked until it has been created, while other operations (such as adding ImageConsumers) are queued until the image is created.


Field Summary
protected  boolean error
          set to true if an error prevents a JimiImage from ever being set
protected  JimiImage image
          the "real" JimiImage being wrapped to
protected  QueuedImageProducerProxy producerProxy
           
 
Constructor Summary
JimiImageHandle()
          Create a new JimiImageHandle.
 
Method Summary
 JimiImageFactory getFactory()
           
 java.awt.image.ImageProducer getImageProducer()
           
 FormatOptionSet getOptions()
           
 JimiImage getWrappedJimiImage()
          Get the back-end image which is being wrapped to.
 boolean isError()
           
 boolean isImageSet()
          Check if the back-end image has been set.
 void setJimiImage(JimiImage image)
          Set the back-end image for the proxy.
 void setOptions(FormatOptionSet options)
           
 void waitFinished()
           
protected  void waitImageSet()
          Wait until the back-end image has been set.
 void waitInfoAvailable()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

image

protected JimiImage image
the "real" JimiImage being wrapped to

error

protected boolean error
set to true if an error prevents a JimiImage from ever being set

producerProxy

protected QueuedImageProducerProxy producerProxy
Constructor Detail

JimiImageHandle

public JimiImageHandle()
Create a new JimiImageHandle.
Method Detail

setJimiImage

public void setJimiImage(JimiImage image)
Set the back-end image for the proxy.

waitImageSet

protected void waitImageSet()
Wait until the back-end image has been set.

isImageSet

public boolean isImageSet()
Check if the back-end image has been set.

getWrappedJimiImage

public JimiImage getWrappedJimiImage()
                              throws JimiException
Get the back-end image which is being wrapped to.

waitFinished

public void waitFinished()
Specified by:
waitFinished in interface JimiImage

waitInfoAvailable

public void waitInfoAvailable()

getImageProducer

public java.awt.image.ImageProducer getImageProducer()
Specified by:
getImageProducer in interface JimiImage

isError

public boolean isError()
Specified by:
isError in interface JimiImage

getFactory

public JimiImageFactory getFactory()
Specified by:
getFactory in interface JimiImage

getOptions

public FormatOptionSet getOptions()
Specified by:
getOptions in interface JimiImage

setOptions

public void setOptions(FormatOptionSet options)
Specified by:
setOptions in interface JimiImage