de.grogra.imp
Class ExternalRenderer

java.lang.Object
  extended by de.grogra.imp.Renderer
      extended by de.grogra.imp.ExternalRenderer
All Implemented Interfaces:
Disposable, java.awt.image.ImageObserver, java.util.EventListener, javax.imageio.event.IIOReadUpdateListener

public class ExternalRenderer
extends Renderer
implements javax.imageio.event.IIOReadUpdateListener


Field Summary
static FilterSource.MetaDataKey<java.util.Collection<java.io.File>> FILELIST
           
protected  java.awt.image.BufferedImage image
           
protected  javax.imageio.ImageReader imageReader
           
protected  java.lang.Thread imageReaderThread
           
protected  java.io.File in
           
protected  java.io.File out
           
protected  MimeType outMimeType
           
protected  Map params
           
protected  java.lang.Process process
           
protected  java.lang.Thread thread
           
 
Fields inherited from class de.grogra.imp.Renderer
height, observers, view, width
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ExternalRenderer(Map params)
           
 
Method Summary
protected  java.io.File createOutFile()
           
protected  java.io.File createTempFile()
           
 void dispose()
           
protected  MimeType getMimeType()
           
 java.lang.String getName()
           
protected  MimeType getOutputMimeType()
           
 void imageUpdate(javax.imageio.ImageReader source, java.awt.image.BufferedImage theImage, int minX, int minY, int width, int height, int periodX, int periodY, int[] bands)
           
 void passComplete(javax.imageio.ImageReader source, java.awt.image.BufferedImage theImage)
           
 void passStarted(javax.imageio.ImageReader source, java.awt.image.BufferedImage theImage, int pass, int minPass, int maxPass, int minX, int minY, int periodX, int periodY, int[] bands)
           
 void render()
           
protected  java.lang.Process startProcess()
           
 void thumbnailPassComplete(javax.imageio.ImageReader source, java.awt.image.BufferedImage theThumbnail)
           
 void thumbnailPassStarted(javax.imageio.ImageReader source, java.awt.image.BufferedImage theThumbnail, int pass, int minPass, int maxPass, int minX, int minY, int periodX, int periodY, int[] bands)
           
 void thumbnailUpdate(javax.imageio.ImageReader source, java.awt.image.BufferedImage theThumbnail, int minX, int minY, int width, int height, int periodX, int periodY, int[] bands)
           
protected  boolean useStdOut()
           
protected  void watchProcess()
           
 
Methods inherited from class de.grogra.imp.Renderer
addImageObserver, computeImage, imageUpdate, initialize, initializeImpl, waitForImage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILELIST

public static final FilterSource.MetaDataKey<java.util.Collection<java.io.File>> FILELIST

image

protected volatile java.awt.image.BufferedImage image

imageReader

protected javax.imageio.ImageReader imageReader

imageReaderThread

protected java.lang.Thread imageReaderThread

in

protected java.io.File in

out

protected java.io.File out

outMimeType

protected MimeType outMimeType

params

protected Map params

process

protected java.lang.Process process

thread

protected volatile java.lang.Thread thread
Constructor Detail

ExternalRenderer

public ExternalRenderer(Map params)
Method Detail

createOutFile

protected java.io.File createOutFile()
                              throws java.io.IOException
Throws:
java.io.IOException

createTempFile

protected java.io.File createTempFile()
                               throws java.io.IOException
Throws:
java.io.IOException

dispose

public void dispose()
Specified by:
dispose in interface Disposable

getMimeType

protected MimeType getMimeType()

getName

public java.lang.String getName()
Specified by:
getName in class Renderer

getOutputMimeType

protected MimeType getOutputMimeType()

imageUpdate

public void imageUpdate(javax.imageio.ImageReader source,
                        java.awt.image.BufferedImage theImage,
                        int minX,
                        int minY,
                        int width,
                        int height,
                        int periodX,
                        int periodY,
                        int[] bands)
Specified by:
imageUpdate in interface javax.imageio.event.IIOReadUpdateListener

passComplete

public void passComplete(javax.imageio.ImageReader source,
                         java.awt.image.BufferedImage theImage)
Specified by:
passComplete in interface javax.imageio.event.IIOReadUpdateListener

passStarted

public void passStarted(javax.imageio.ImageReader source,
                        java.awt.image.BufferedImage theImage,
                        int pass,
                        int minPass,
                        int maxPass,
                        int minX,
                        int minY,
                        int periodX,
                        int periodY,
                        int[] bands)
Specified by:
passStarted in interface javax.imageio.event.IIOReadUpdateListener

render

public void render()
            throws java.io.IOException
Specified by:
render in class Renderer
Throws:
java.io.IOException

startProcess

protected java.lang.Process startProcess()
                                  throws java.io.IOException
Throws:
java.io.IOException

thumbnailPassComplete

public void thumbnailPassComplete(javax.imageio.ImageReader source,
                                  java.awt.image.BufferedImage theThumbnail)
Specified by:
thumbnailPassComplete in interface javax.imageio.event.IIOReadUpdateListener

thumbnailPassStarted

public void thumbnailPassStarted(javax.imageio.ImageReader source,
                                 java.awt.image.BufferedImage theThumbnail,
                                 int pass,
                                 int minPass,
                                 int maxPass,
                                 int minX,
                                 int minY,
                                 int periodX,
                                 int periodY,
                                 int[] bands)
Specified by:
thumbnailPassStarted in interface javax.imageio.event.IIOReadUpdateListener

thumbnailUpdate

public void thumbnailUpdate(javax.imageio.ImageReader source,
                            java.awt.image.BufferedImage theThumbnail,
                            int minX,
                            int minY,
                            int width,
                            int height,
                            int periodX,
                            int periodY,
                            int[] bands)
Specified by:
thumbnailUpdate in interface javax.imageio.event.IIOReadUpdateListener

useStdOut

protected boolean useStdOut()

watchProcess

protected void watchProcess()
                     throws java.io.IOException
Throws:
java.io.IOException