com.saic.isd.printscreen
Class ImageUtil

java.lang.Object
  extended bycom.saic.isd.printscreen.ImageUtil

public class ImageUtil
extends java.lang.Object

A class that converts image data to JPEG format. Note that this class makes use of com.sun.image.codec classes that are NOT part of the supported Java JDK. This class may have to change to use the Java Imaging API at a future date.

Component is 'imaged' at time the JpegFormatter constructor is called. Changes in the component made after this constrcutor is called will not be retained in the Jpeg image.

Version:
$Revision: 1.2 $
Author:
Gerhard Beck (originator), $Author: beckg $ (latest)

Constructor Summary
ImageUtil()
           
 
Method Summary
static void copy(java.awt.Component component)
           
static java.awt.image.BufferedImage paintImage(java.awt.Component component)
          Paints the supplied component into the returned BufferedImage
static java.awt.image.BufferedImage paintImageForComponent(java.awt.Component window, java.awt.Component map, java.awt.image.BufferedImage insert)
          Takes a screen image and replaces one component's picture with the passed in image.
static void preview(java.awt.Component owner, java.lang.String title)
           
static void preview(javax.swing.JDialog dialog, java.awt.Component cmp)
           
static void preview(java.awt.Window owner, java.lang.String title, java.awt.Component cmp)
           
static void save(java.awt.image.BufferedImage image, java.io.OutputStream stream)
           
static void save(java.awt.Component component)
           
static void save(java.awt.Component component, java.awt.image.BufferedImage image)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageUtil

public ImageUtil()
Method Detail

paintImage

public static java.awt.image.BufferedImage paintImage(java.awt.Component component)
Paints the supplied component into the returned BufferedImage


save

public static void save(java.awt.image.BufferedImage image,
                        java.io.OutputStream stream)

preview

public static void preview(java.awt.Component owner,
                           java.lang.String title)

copy

public static void copy(java.awt.Component component)

save

public static void save(java.awt.Component component)

save

public static void save(java.awt.Component component,
                        java.awt.image.BufferedImage image)

preview

public static void preview(java.awt.Window owner,
                           java.lang.String title,
                           java.awt.Component cmp)

preview

public static void preview(javax.swing.JDialog dialog,
                           java.awt.Component cmp)

paintImageForComponent

public static java.awt.image.BufferedImage paintImageForComponent(java.awt.Component window,
                                                                  java.awt.Component map,
                                                                  java.awt.image.BufferedImage insert)
Takes a screen image and replaces one component's picture with the passed in image. Used for generating an image when an external C program is painting directly on a canvas.



Copyright © 2002 Gerhard Beck. All rights reserved. Subject to GPL.