Class ScreenshotHelper

java.lang.Object
net.simplace.ui.service.ScreenshotHelper

public class ScreenshotHelper extends Object
Creates screenshots of GUI components and copies them to the clipboard or saves them to a file.
Author:
ckunze
  • Method Details

    • copyScreenshotToClipboard

      public static void copyScreenshotToClipboard(Component aComponent)
      Creates a screenshot of a GUI component and copies it to the system clipboard.
      Parameters:
      aComponent - the component to be copied to the clipboard
    • copyScreenshotToFile

      public static void copyScreenshotToFile(Component aComponent, File aFile)
      Creates a screenshot of a GUI component and saves it as PNG file. I/O errors are logged, not thrown.
      Parameters:
      aComponent - the component to save
      aFile - target PNG file