JGraphpad Pro
v6.0.5.0


com.jgraph.pad.util
Class JGraphpadImageEncoder

java.lang.Object
  extended bycom.jgraph.pad.util.JGraphpadImageEncoder
All Implemented Interfaces:
ImageConsumer
Direct Known Subclasses:
JGraphpadImageEncoder.GifEncoder

public abstract class JGraphpadImageEncoder
extends Object
implements ImageConsumer


Nested Class Summary
static class JGraphpadImageEncoder.GifEncoder
           
static class JGraphpadImageEncoder.IntHashtable
           
 
Field Summary
protected  OutputStream out
           
 
Fields inherited from interface java.awt.image.ImageConsumer
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
 
Constructor Summary
JGraphpadImageEncoder(Image img, OutputStream out)
           
JGraphpadImageEncoder(ImageProducer producer, OutputStream out)
           
 
Method Summary
 void encode()
           
 void imageComplete(int status)
           
 void setColorModel(ColorModel model)
           
 void setDimensions(int width, int height)
           
 void setHints(int hintflags)
           
 void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize)
           
 void setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize)
           
 void setProperties(Hashtable props)
           
static void writeGIF(Image image, OutputStream out)
          Public GIF Encoding method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

protected OutputStream out
Constructor Detail

JGraphpadImageEncoder

public JGraphpadImageEncoder(Image img,
                             OutputStream out)
                      throws IOException

JGraphpadImageEncoder

public JGraphpadImageEncoder(ImageProducer producer,
                             OutputStream out)
                      throws IOException
Method Detail

writeGIF

public static void writeGIF(Image image,
                            OutputStream out)
                     throws IOException
Public GIF Encoding method. Use this method for GIF encoding in JGraph editors.

Throws:
IOException

encode

public void encode()
            throws IOException
Throws:
IOException

setDimensions

public void setDimensions(int width,
                          int height)
Specified by:
setDimensions in interface ImageConsumer

setProperties

public void setProperties(Hashtable props)
Specified by:
setProperties in interface ImageConsumer

setColorModel

public void setColorModel(ColorModel model)
Specified by:
setColorModel in interface ImageConsumer

setHints

public void setHints(int hintflags)
Specified by:
setHints in interface ImageConsumer

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      ColorModel model,
                      byte[] pixels,
                      int off,
                      int scansize)
Specified by:
setPixels in interface ImageConsumer

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      ColorModel model,
                      int[] pixels,
                      int off,
                      int scansize)
Specified by:
setPixels in interface ImageConsumer

imageComplete

public void imageComplete(int status)
Specified by:
imageComplete in interface ImageConsumer

JGraphpad Pro
v6.0.5.0


Copyright (C) 2005 JGraph.com. All rights reserved.