public class NoopScreenshotTaker extends Object implements ScreenshotTakerIF
Constructor and Description |
---|
NoopScreenshotTaker() |
Modifier and Type | Method and Description |
---|---|
void |
saveComponentAsPng(Component c,
String imageFilePath)
Takes a screenshot of the given AWT or Swing
Component and saves it as a PNG file. |
void |
saveDesktopAsPng(String imageFilePath)
Takes a screenshot of the desktop and saves it as a PNG file.
|
void |
saveImage(BufferedImage image,
String filePath)
Saves the given image as a PNG file.
|
BufferedImage |
takeDesktopScreenshot()
Takes a screenshot of the desktop.
|
BufferedImage |
takeScreenshotOf(Component c)
Takes a screenshot of the given AWT or Swing
Component . |
public void saveDesktopAsPng(String imageFilePath)
ScreenshotTakerIF
saveDesktopAsPng
in interface ScreenshotTakerIF
imageFilePath
- the path of the file to save the screenshot to.public BufferedImage takeDesktopScreenshot()
ScreenshotTakerIF
takeDesktopScreenshot
in interface ScreenshotTakerIF
public void saveComponentAsPng(Component c, String imageFilePath)
ScreenshotTakerIF
Component
and saves it as a PNG file.saveComponentAsPng
in interface ScreenshotTakerIF
c
- the given Component
.imageFilePath
- the path of the file to save the screenshot to.public BufferedImage takeScreenshotOf(Component c)
ScreenshotTakerIF
Component
.takeScreenshotOf
in interface ScreenshotTakerIF
c
- the given Component
.Component
.public void saveImage(BufferedImage image, String filePath)
ScreenshotTakerIF
saveImage
in interface ScreenshotTakerIF
image
- the image to save.filePath
- the path of the file to save the image to.Copyright © 2014–2017 AssertJ. All rights reserved.