Class DemoScreenshotGenerator

java.lang.Object
com.esprit.utils.DemoScreenshotGenerator

public class DemoScreenshotGenerator extends Object
Utility class for generating high-quality screenshots for Product Hunt demo materials This class provides automated screenshot generation capabilities for JavaFX applications
  • Field Details

  • Constructor Details

    • DemoScreenshotGenerator

      public DemoScreenshotGenerator()
  • Method Details

    • createScreenshotsDirectory

      private static void createScreenshotsDirectory()
      Create screenshots directory if it doesn't exist
    • captureStage

      public static Path captureStage(javafx.stage.Stage stage, String filename)
      Capture screenshot of entire stage/window
      Parameters:
      stage - The JavaFX Stage to capture
      filename - Custom filename (without extension)
      Returns:
      Path to the generated screenshot file
    • captureNode

      public static Path captureNode(javafx.scene.Node node, String filename)
      Capture screenshot of specific node/component
      Parameters:
      node - The JavaFX Node to capture
      filename - Custom filename (without extension)
      Returns:
      Path to the generated screenshot file
    • captureMultipleStages

      public static Path[] captureMultipleStages(javafx.stage.Stage[] stages, String baseFilename)
      Capture multiple screenshots of different scenes/stages
      Parameters:
      stages - Array of stages to capture
      baseFilename - 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

      public static Path getScreenshotsDirectory()
      Get the screenshots directory path
      Returns:
      Path to screenshots directory