public class ScreenImage
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.util.List<java.lang.String> |
types |
Constructor and Description |
---|
ScreenImage() |
Modifier and Type | Method and Description |
---|---|
static java.awt.image.BufferedImage |
createDesktopImage()
Convenience method to create a BufferedImage of the desktop
|
static java.awt.image.BufferedImage |
createImage(java.awt.Component component) |
static java.awt.image.BufferedImage |
createImage(javax.swing.JComponent component) |
static java.awt.image.BufferedImage |
createImage(javax.swing.JComponent component,
java.awt.Rectangle region) |
static java.awt.image.BufferedImage |
createImage(java.awt.Rectangle region)
Create a BufferedImage from a rectangular region on the screen.
|
(package private) static void |
layoutComponent(java.awt.Component component) |
static void |
writeImage(java.awt.image.BufferedImage image,
java.lang.String fileName)
Write a BufferedImage to a File.
|
public static java.awt.image.BufferedImage createImage(javax.swing.JComponent component)
public static java.awt.image.BufferedImage createImage(javax.swing.JComponent component, java.awt.Rectangle region)
public static java.awt.image.BufferedImage createDesktopImage() throws java.awt.AWTException, java.io.IOException
java.awt.AWTException
- see Robot class constructorsjava.io.IOException
- if an error occurs during writingpublic static java.awt.image.BufferedImage createImage(java.awt.Component component) throws java.awt.AWTException
java.awt.AWTException
public static java.awt.image.BufferedImage createImage(java.awt.Rectangle region) throws java.awt.AWTException
region
- region on the screen to create image fromjava.awt.AWTException
- see Robot class constructorspublic static 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 createdjava.io.IOException
- if an error occurs during writingstatic void layoutComponent(java.awt.Component component)