Class ScreenshotConfiguration

java.lang.Object
uk.ac.diamond.screenshot.api.ScreenshotConfiguration

public class ScreenshotConfiguration extends Object
Immutable configuration object to define screenshot parameters.
  • Constructor Details

    • ScreenshotConfiguration

      public ScreenshotConfiguration(String filePath, ScreenshotConfiguration.ScreenshotType type)
      Creates a new screenshot configuration.
      Parameters:
      filePath - The path of the file to save the image to
      type - The screenshot type (must be ACTIVE_WINDOW or WHOLE_DISPLAY)
    • ScreenshotConfiguration

      public ScreenshotConfiguration(String filePath, ScreenshotConfiguration.ScreenshotType type, org.eclipse.swt.graphics.Rectangle area)
      Creates a new configuration for a rectangular screenshot.
      Parameters:
      filePath - The path of the file to save the image to
      type - The screenshot type (must be RECTANGLE)
      area - The target area of the screen
  • Method Details

    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getFilePath

      public String getFilePath()
      Get the file path.
      Returns:
      The file path
    • getType

      Get the screenshot type.
      Returns:
      The screenshot type
    • getTargetArea

      public org.eclipse.swt.graphics.Rectangle getTargetArea()
      Get the target area.
      Returns:
      The target area