Class UICapture

java.lang.Object
uno.anahata.ai.swing.UICapture

public class UICapture extends Object
Utility class for capturing screenshots of screen devices and application windows.
  • Field Details

    • TIMESTAMP_FORMAT

      public static final SimpleDateFormat TIMESTAMP_FORMAT
    • SCREENSHOTS_DIR

      public static final File SCREENSHOTS_DIR
  • Constructor Details

    • UICapture

      public UICapture()
  • Method Details

    • screenshotAllScreenDevices

      public static List<File> screenshotAllScreenDevices()
      Captures a screenshot of all available screen devices.
      Returns:
      A list of files containing the screenshots.
    • screenshotScreenDevice

      public static File screenshotScreenDevice(int index) throws Exception
      Captures a screenshot of a specific screen device by its index.
      Parameters:
      index - The index of the screen device.
      Returns:
      The file containing the screenshot.
      Throws:
      Exception - if the capture fails or the index is invalid.
    • screenshotAllJFrames

      public static List<File> screenshotAllJFrames()
      Captures a screenshot of all visible JFrames in the application.
      Returns:
      A list of files containing the screenshots.