|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.robotics.image.ScreenImage
public class ScreenImage
Utility class to capture buffered images from swing and AWT components.
Constructor Summary | |
---|---|
ScreenImage()
|
Method Summary | |
---|---|
java.awt.image.BufferedImage |
createDesktopImage()
Convenience method to create a BufferedImage of the desktop |
java.awt.image.BufferedImage |
createImage(java.awt.Component component)
|
java.awt.image.BufferedImage |
createImage(javax.swing.JComponent component)
|
java.awt.image.BufferedImage |
createImage(javax.swing.JComponent component,
java.awt.Rectangle region)
|
java.awt.image.BufferedImage |
createImage(java.awt.Rectangle region)
Create a BufferedImage from a rectangular region on the screen. |
void |
writeImage(java.awt.image.BufferedImage image,
java.lang.String fileName)
Write a BufferedImage to a File. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScreenImage()
Method Detail |
---|
public java.awt.image.BufferedImage createImage(javax.swing.JComponent component) throws java.io.IOException
java.io.IOException
public java.awt.image.BufferedImage createImage(javax.swing.JComponent component, java.awt.Rectangle region) throws java.io.IOException
java.io.IOException
public java.awt.image.BufferedImage createImage(java.awt.Component component) throws java.awt.AWTException, java.io.IOException
java.awt.AWTException
java.io.IOException
public java.awt.image.BufferedImage createImage(java.awt.Rectangle region) throws java.awt.AWTException, java.io.IOException
region
- region on the screen to create image from
java.awt.AWTException
- see Robot class constructors
java.io.IOException
- if an error occurs during writingpublic java.awt.image.BufferedImage createDesktopImage() throws java.awt.AWTException, java.io.IOException
java.awt.AWTException
- see Robot class constructors
java.io.IOException
- if an error occurs during writingpublic void writeImage(java.awt.image.BufferedImage image, java.lang.String fileName) throws java.io.IOException
image
- image to be writtenfileName
- name of file to be created
java.io.IOException
- if an error occurs during writing
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |