Package uk.ac.diamond.screenshot.api
Class ScreenshotConfiguration
java.lang.Object
uk.ac.diamond.screenshot.api.ScreenshotConfiguration
Immutable configuration object to define screenshot parameters.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumScreenshot types. -
Constructor Summary
ConstructorsConstructorDescriptionScreenshotConfiguration(String filePath, ScreenshotConfiguration.ScreenshotType type) Creates a new screenshot configuration.ScreenshotConfiguration(String filePath, ScreenshotConfiguration.ScreenshotType type, org.eclipse.swt.graphics.Rectangle area) Creates a new configuration for a rectangular screenshot. -
Method Summary
-
Constructor Details
-
ScreenshotConfiguration
Creates a new screenshot configuration.- Parameters:
filePath- The path of the file to save the image totype- The screenshot type (must beACTIVE_WINDOWorWHOLE_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 totype- The screenshot type (must beRECTANGLE)area- The target area of the screen
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
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
-