Purple Code

com.purpletech.awt
Class ImageBuilder

java.lang.Object
  |
  +--com.purpletech.awt.ImageBuilder
All Implemented Interfaces:
java.awt.image.ImageObserver

public class ImageBuilder
extends java.lang.Object
implements java.awt.image.ImageObserver

Builds an image by layering a series of transparent GIFs (or any transparent images). See also com.purpletech.servlets.ImageServlet.


Nested Class Summary
static class ImageBuilder.ImageInfo
           
 
Field Summary
protected  java.awt.Graphics g
           
 int height
           
protected  java.awt.Image img
           
 int width
           
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ImageBuilder(int width, int height)
           
 
Method Summary
 void addImageList(java.lang.String path, java.util.Vector v)
           
static java.util.Vector buildImageList(java.lang.String list, java.lang.String ext)
          Pass in a semicolon-delimited list of image file names, get back a vector of ImageInfo records that you can pass to addImageList.
 void dispose()
           
 boolean imageUpdate(java.awt.Image img, int infoflags, int x, int y, int width, int height)
           
 void writeFile(java.lang.String file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

width

public int width

height

public int height

img

protected java.awt.Image img

g

protected java.awt.Graphics g
Constructor Detail

ImageBuilder

public ImageBuilder(int width,
                    int height)
Method Detail

buildImageList

public static java.util.Vector buildImageList(java.lang.String list,
                                              java.lang.String ext)
Pass in a semicolon-delimited list of image file names, get back a vector of ImageInfo records that you can pass to addImageList. Optionally, each image file name can end with ",x,y" for a pixel offset.

Parameters:
list - a semicolon-delimited list of image file names
ext - file type, e.g. ".gif" (if null, then we assume all file names have the right extension)

addImageList

public void addImageList(java.lang.String path,
                         java.util.Vector v)
                  throws java.io.IOException
java.io.IOException

imageUpdate

public boolean imageUpdate(java.awt.Image img,
                           int infoflags,
                           int x,
                           int y,
                           int width,
                           int height)
Specified by:
imageUpdate in interface java.awt.image.ImageObserver

writeFile

public void writeFile(java.lang.String file)
               throws java.io.IOException
java.io.IOException

dispose

public void dispose()

Documentation generated March 5 2003