|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.wotonomy.ui.swing.util.WindowGrabber
public class WindowGrabber
WindowGrabber is a collection of static utility methods
for taking screen shots of lightweight containers. All
components that are not native peers will be drawn to a
bitmap that will be run-length compressed (LZW encoding, GIF format)
and written to the specified file or output stream.
Any Swing/JFC or IFC window is a good candidate for use with these
methods. The component is not expected to contain more than 256 colors
(the maximum that GIF allows). While there is a color depth limitation,
the compression is lossless, with no blurs or bleeding color.
| Constructor Summary | |
|---|---|
WindowGrabber()
|
|
| Method Summary | |
|---|---|
static boolean |
grab(java.awt.Component aComponent,
java.io.OutputStream anOutputStream)
Captures the screen contents of the specified component, and write it to a file with the specified name. |
static boolean |
grab(java.awt.Component aComponent,
java.lang.String aFileName)
Captures the screen contents of the specified component, and write it to a file with the specified name. |
static void |
main(java.lang.String[] argv)
Captures images of any Swing window component classes specified as parameters. |
protected static void |
processFilenames(java.lang.String path,
java.lang.String[] filenames)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WindowGrabber()
| Method Detail |
|---|
public static boolean grab(java.awt.Component aComponent,
java.lang.String aFileName)
aComponent - a lightweight component or container.aFileName - the name of the file to write, optionally preceded by path.
public static boolean grab(java.awt.Component aComponent,
java.io.OutputStream anOutputStream)
aComponent - a lightweight component or container.anOutputStream - an output stream to which the image will be written.
protected static void processFilenames(java.lang.String path,
java.lang.String[] filenames)
public static void main(java.lang.String[] argv)
argv - a list of filenames or directory names.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||