Package com.esprit.utils
Class DemoScreenshotGenerator
java.lang.Object
com.esprit.utils.DemoScreenshotGenerator
Utility class for generating high-quality screenshots for Product Hunt demo
materials This class provides automated screenshot generation capabilities
for JavaFX applications
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
private static final String
private static final DateTimeFormatter
private static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Path[]
captureMultipleStages
(javafx.stage.Stage[] stages, String baseFilename) Capture multiple screenshots of different scenes/stagesstatic Path
captureNode
(javafx.scene.Node node, String filename) Capture screenshot of specific node/componentstatic Path
captureStage
(javafx.stage.Stage stage, String filename) Capture screenshot of entire stage/windowstatic void
cleanupOldScreenshots
(int keepCount) Clean up old screenshots (keeps only recent ones)private static void
Create screenshots directory if it doesn't existstatic void
Generate demo workflow screenshots This method captures key application states for Product Hunt demostatic Path
Get the screenshots directory path
-
Field Details
-
log
private static final org.slf4j.Logger log -
SCREENSHOTS_DIR
- See Also:
-
TIMESTAMP_PATTERN
- See Also:
-
TIMESTAMP_FORMATTER
-
-
Constructor Details
-
DemoScreenshotGenerator
public DemoScreenshotGenerator()
-
-
Method Details
-
createScreenshotsDirectory
private static void createScreenshotsDirectory()Create screenshots directory if it doesn't exist -
captureStage
Capture screenshot of entire stage/window- Parameters:
stage
- The JavaFX Stage to capturefilename
- Custom filename (without extension)- Returns:
- Path to the generated screenshot file
-
captureNode
Capture screenshot of specific node/component- Parameters:
node
- The JavaFX Node to capturefilename
- Custom filename (without extension)- Returns:
- Path to the generated screenshot file
-
captureMultipleStages
Capture multiple screenshots of different scenes/stages- Parameters:
stages
- Array of stages to capturebaseFilename
- Base filename (will be appended with numbers)- Returns:
- Array of paths to generated screenshot files
-
generateDemoWorkflow
public static void generateDemoWorkflow()Generate demo workflow screenshots This method captures key application states for Product Hunt demo -
cleanupOldScreenshots
public static void cleanupOldScreenshots(int keepCount) Clean up old screenshots (keeps only recent ones)- Parameters:
keepCount
- Number of recent screenshots to keep
-
getScreenshotsDirectory
Get the screenshots directory path- Returns:
- Path to screenshots directory
-