public class ImageCaptureManager
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected DefaultFolderAccessory |
_defaultFolderAccessory
accessory for managing the default snapshot folder
|
protected javax.swing.JFileChooser |
_fileChooser
chooser for saving images
|
protected static int |
NO_OPTION |
protected static int |
YES_OPTION |
| Modifier | Constructor and Description |
|---|---|
protected |
ImageCaptureManager()
Creates a new instance of ImageCaptureManager
|
| Modifier and Type | Method and Description |
|---|---|
static ImageCaptureManager |
defaultManager()
Get the default ImageCaptureManager instance.
|
static int |
displayConfirmDialog(java.awt.Component owner,
java.lang.String title,
java.lang.String message)
Display a confirmation dialog with a title and message
|
javax.swing.JFileChooser |
getFileChooser()
Get the file chooser which determines where snapshots are saved.
|
void |
saveSnapshot(java.awt.Component component)
Save a snapshot of the component as a PNG image.
|
void |
saveSnapshot(java.awt.Component component,
java.lang.String name)
Save a snapshot of the component as a PNG image.
|
protected static final int YES_OPTION
protected static final int NO_OPTION
protected final javax.swing.JFileChooser _fileChooser
protected final DefaultFolderAccessory _defaultFolderAccessory
protected ImageCaptureManager()
public static ImageCaptureManager defaultManager()
public javax.swing.JFileChooser getFileChooser()
public void saveSnapshot(java.awt.Component component)
throws java.awt.AWTException,
java.io.IOException
component - The component to capture.java.awt.AWTException - If there is an AWT exception.java.io.IOException - If there is a file exception.public void saveSnapshot(java.awt.Component component,
java.lang.String name)
throws java.awt.AWTException,
java.io.IOException
component - The component to capture.name - The snapshot namejava.awt.AWTException - If there is an AWT exception.java.io.IOException - If there is a file exception.public static int displayConfirmDialog(java.awt.Component owner,
java.lang.String title,
java.lang.String message)
owner - The component in front of which to show the dialogtitle - The title of the dialogmessage - The message to display