com.teamdev.jxcapture.image.operation
Class Capture

java.lang.Object
  extended by com.teamdev.jxcapture.image.operation.Capture

public class Capture
extends java.lang.Object

The class defines the functions that allow capturing a specified UI element (like desktop, active window or specific region on the screen).


Constructor Summary
Capture()
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Capture

public Capture()
Method Detail

captureDesktop

public static void captureDesktop(CaptureListener captureListener)
Allows making capture of the desktop. The operation uses the default capture settings specified in the com.teamdev.jxcapture.CaptureSettings class.

The method uses the DesktopCapture operation.

Parameters:
captureListener - the listener that will be invoked when the capture operation will be completed.

captureActiveWindow

public static void captureActiveWindow(CaptureListener captureListener)
Allows capturing a foreground window. The operation uses the default capture settings specified in the com.teamdev.jxcapture.CaptureSettings class.

The method uses the ActiveWindowCapture operation.

Parameters:
captureListener - the listener that will be invoked when the capture operation will be completed.

captureRegion

public static void captureRegion(CaptureListener captureListener)
Allows capturing a specified region on the screen. The operation uses the default capture settings that specified in the com.teamdev.jxcapture.CaptureSettings class.

The method uses the RegionCapture operation.

For processing the keyboard and mouse events, the RegionController class is used .

Parameters:
captureListener - the listener that will be invoked when the capture operation will be completed.

captureScreenObject

public static void captureScreenObject(CaptureListener captureListener)
Allows capturing a specified region on the screen. The operation uses the default capture settings specified in the com.teamdev.jxcapture.CaptureSettings class.

The method uses the ScreenObjectCapture operation.

For processing the keyboard and mouse events, the ScreenObjectController class is used.

Parameters:
captureListener - the listener that will be invoked when the capture operation will be completed.

captureObject

public static void captureObject(CaptureListener captureListener)
Allows capturing a specified region on the screen. The operation uses the default capture settings specified in the com.teamdev.jxcapture.CaptureSettings class.

The method uses the ObjectCapture operation.

Parameters:
captureListener - the listener that will be invoked when the capture operation will be completed.

createScreenCapture

public java.awt.image.BufferedImage createScreenCapture(java.awt.Rectangle screenRect)
Creates an image containing pixels read from the screen.

Parameters:
screenRect - rect to capture in screen coordinates
Returns:
The captured image
Throws:
java.lang.IllegalArgumentException - if screenRect width and height are not greater than zero or more than screen size