nl.cwi.sen1.visplugin.screenshotmaker
Class ScreenshotMaker
java.lang.Object
nl.cwi.sen1.visplugin.screenshotmaker.ScreenshotMaker
public class ScreenshotMaker
- extends java.lang.Object
ScreenshotMaker has the functionality to export a JPanel as an image
- Author:
- R. Bergen, S. Tharmarajah
Method Summary |
private static java.awt.image.BufferedImage |
createImageFromPanel(javax.swing.JPanel jPanel)
Create a BufferedImage from a given JPanel. |
static void |
saveScreenshot(javax.swing.JPanel jPanel,
java.lang.String exportDestination,
java.lang.String fileExtension)
Save a JPanel as an image to a given destination. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JPEG_EXTENSION
public static final java.lang.String JPEG_EXTENSION
- See Also:
- Constant Field Values
PNG_EXTENSION
public static final java.lang.String PNG_EXTENSION
- See Also:
- Constant Field Values
DEFAULT_EXTENSION
public static final java.lang.String DEFAULT_EXTENSION
- See Also:
- Constant Field Values
ScreenshotMaker
public ScreenshotMaker()
saveScreenshot
public static void saveScreenshot(javax.swing.JPanel jPanel,
java.lang.String exportDestination,
java.lang.String fileExtension)
- Save a JPanel as an image to a given destination.
- Parameters:
JPanel
- The Jpanel which should be savedexportDestination
- The destination of the exported imagefileExtension
- The extension of the exported image
createImageFromPanel
private static java.awt.image.BufferedImage createImageFromPanel(javax.swing.JPanel jPanel)
- Create a BufferedImage from a given JPanel.
- Parameters:
JPanel
- The Jpanel which should be saved
- Returns:
- bufferedImage a BufferedImage of the given JPanel