public class Capture
extends java.lang.Object
| Constructor and Description |
|---|
Capture() |
| Modifier and Type | Method and Description |
|---|---|
static void |
captureActiveWindow(CaptureListener captureListener)
Allows capturing a foreground window.
|
static void |
captureDesktop(CaptureListener captureListener)
Allows making capture of the desktop.
|
static void |
captureObject(CaptureListener captureListener)
Allows capturing a specified region on the screen.
|
static void |
captureRegion(CaptureListener captureListener)
Allows capturing a specified region on the screen.
|
static void |
captureScreenObject(CaptureListener captureListener)
Allows capturing a specified region on the screen.
|
java.awt.image.BufferedImage |
createScreenCapture(java.awt.Rectangle screenRect)
Creates an image containing pixels read from the screen.
|
public static void captureDesktop(CaptureListener captureListener)
The method uses the DesktopCapture operation.
captureListener - the listener that will be invoked when the
capture operation will be completed.public static void captureActiveWindow(CaptureListener captureListener)
The method uses the ActiveWindowCapture operation.
captureListener - the listener that will be invoked when the
capture operation will be completed.public static void captureRegion(CaptureListener captureListener)
The method uses the RegionCapture operation.
For processing
the keyboard and mouse events, the RegionController class is used .
captureListener - the listener that will be invoked when the
capture operation will be completed.public static void captureScreenObject(CaptureListener captureListener)
The method uses the ScreenObjectCapture operation.
For processing
the keyboard and mouse events, the ScreenObjectController class is used.
captureListener - the listener that will be invoked when the
capture operation will be completed.public static void captureObject(CaptureListener captureListener)
The method uses the ObjectCapture operation.
captureListener - the listener that will be invoked when the
capture operation will be completed.public java.awt.image.BufferedImage createScreenCapture(java.awt.Rectangle screenRect)
screenRect - rect to capture in screen coordinatesjava.lang.IllegalArgumentException - if screenRect width and height
are not greater than zero or more than screen size