|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.teamdev.jxcapture.ImageCapture
public abstract class ImageCapture
Base class that defines the image capture API.
Field Summary | |
---|---|
static java.lang.String |
PROPERTY_CAPTURE_AREA
|
static java.lang.String |
PROPERTY_CAPTURE_TRANSPARENT_WINDOWS
|
static java.lang.String |
PROPERTY_IMAGE_SOURCE
|
static java.lang.String |
PROPERTY_INCLUDE_CURSOR
|
Constructor Summary | |
---|---|
protected |
ImageCapture()
Creates new image capture. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add the specified property listener. |
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Add the specified property listener. |
abstract void |
copyToClipboard()
Copies this capture to the system clipboard as a bitmap. |
static ImageCapture |
create()
Factory method that creates new instance of image capture instance depending on a current platform. |
static ImageCapture |
create(ImageSource source)
Factory method that creates new instance of image capture instance depending on a current platform and specified image source. |
static ImageCapture |
create(com.teamdev.jxdesktop.UIElement element)
Factory method that creates new instance of image capture instance depending on a current platform. |
java.awt.Rectangle |
getCaptureArea()
|
abstract java.awt.image.BufferedImage |
getImage()
Returns a Java image of this image capture. |
ImageSource |
getImageSource()
Returns the specified video source. |
protected java.beans.PropertyChangeSupport |
getPropertyChangeSupport()
|
boolean |
isCaptureTransparentWindows()
Returns true if the capture operation allows to capture
transparent or layered windows, otherwise - false . |
boolean |
isIncludeCursor()
Determines whether the resulting image of the capture operation includes the cursor image. |
abstract void |
release()
Releases all resources of this image capture. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove the specified property listener. |
ImageCapture |
resize(java.awt.Dimension dimensions)
This method resizes this image capture using default interpolation mode InterpolationMode.Default |
abstract ImageCapture |
resize(java.awt.Dimension dimensions,
InterpolationMode interpolation)
Resizes this image capture to new dimensions using the specified interpolation mode. |
boolean |
save(java.io.File file,
ImageFormat format)
Saves this image capture to a file with the specified image format using the best compression quality. |
abstract boolean |
save(java.io.File file,
ImageFormat format,
CompressionQuality quality)
Saves this image capture to a file with the specified image format. |
void |
setCaptureArea(java.awt.Rectangle area)
|
void |
setCaptureTransparentWindows(boolean captureTransparentWindows)
Sets true if the captureTransparentWindows operation should allow to captureTransparentWindows
transparent or layered windows, otherwise - false . |
void |
setImageSource(ImageSource source)
Specifies video source for recording. |
void |
setIncludeCursor(boolean includeCursor)
Includes (or excludes) the cursor image to (or from) the resulting image of the capture operation. |
abstract ImageCapture |
takeSnapshot()
Takes a snapshot of a specified capture area. |
static java.awt.image.BufferedImage |
toBufferedImage(java.awt.Image image)
Converts given image to buffered image. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROPERTY_IMAGE_SOURCE
public static final java.lang.String PROPERTY_CAPTURE_AREA
public static final java.lang.String PROPERTY_INCLUDE_CURSOR
public static final java.lang.String PROPERTY_CAPTURE_TRANSPARENT_WINDOWS
Constructor Detail |
---|
protected ImageCapture()
Method Detail |
---|
public static ImageCapture create()
public static ImageCapture create(com.teamdev.jxdesktop.UIElement element)
element
- defines UI element to capture
public static ImageCapture create(ImageSource source)
source
- image source
public abstract ImageCapture takeSnapshot()
resize(java.awt.Dimension, InterpolationMode)
method,
or saved to the file using the save(java.io.File, com.teamdev.jxcapture.image.ImageFormat, CompressionQuality)
method, or just returned as Java image using
the getImage()
method.
public abstract java.awt.image.BufferedImage getImage()
Before calling this method you should invoke the takeSnapshot()
method first.
public abstract ImageCapture resize(java.awt.Dimension dimensions, InterpolationMode interpolation)
Before calling this method you should invoke the takeSnapshot()
method first.
dimensions
- specifies new dimensionsinterpolation
- specifies interpolation mode
public ImageCapture resize(java.awt.Dimension dimensions)
InterpolationMode.Default
Before calling this method you should invoke the takeSnapshot()
method first.
dimensions
- specifies new dimensions
public abstract boolean save(java.io.File file, ImageFormat format, CompressionQuality quality) throws java.io.IOException
Before calling this method you should invoke the takeSnapshot()
method first.
file
- destination fileformat
- required image formatquality
- required compression quality of resulting image
java.io.IOException
- if any error occurs during the operationpublic boolean save(java.io.File file, ImageFormat format) throws java.io.IOException
Before calling this method you should invoke the takeSnapshot()
method first.
file
- destination fileformat
- required image format
java.io.IOException
- if any error occurs during the operationpublic abstract void copyToClipboard()
public abstract void release()
public static java.awt.image.BufferedImage toBufferedImage(java.awt.Image image)
image
- image to convert
public ImageSource getImageSource()
public void setImageSource(ImageSource source)
source
- new video sourceprotected java.beans.PropertyChangeSupport getPropertyChangeSupport()
public void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
propertyName
- property namelistener
- listenerpublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- listenerpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- listenerpublic java.awt.Rectangle getCaptureArea()
public void setCaptureArea(java.awt.Rectangle area)
area
- required rectangular capture areapublic boolean isIncludeCursor()
true
if the result of the capture operation
includes the cursor image, false
otherwisepublic void setIncludeCursor(boolean includeCursor)
includeCursor
- If true
, this cursor image is
included into the result of the capture operation;
otherwise notpublic boolean isCaptureTransparentWindows()
true
if the capture operation allows to capture
transparent or layered windows, otherwise - false
.
A layered or transparent window is used by some applications to create a fade-in/out effect for menus and windows. Layered windows are also used for desktop animation, such as animated help assistants.
true
if the capture transparent or layered window
option is set, otherwise - false
public void setCaptureTransparentWindows(boolean captureTransparentWindows)
true
if the captureTransparentWindows operation should allow to captureTransparentWindows
transparent or layered windows, otherwise - false
.
A layered or transparent window is used by some applications to create a fade-in/out effect for menus and windows. Layered windows are also used for desktop animation, such as animated help assistants.
captureTransparentWindows
- true
if the captureTransparentWindows operation should allow
to captureTransparentWindows transparent or layered window, otherwise -
false
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |