Interface ScreenshotController


public interface ScreenshotController
Controller for taking screenshots of the visualization.
Author:
Mathieu Bastian
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setAutoSave(boolean autoSave)
    Sets whether the screenshot should be automatically saved to disk, or if a file chooser should be shown.
    void
    Sets the default directory for saving screenshots.
    void
    setScaleFactor(int scaleFactor)
    Sets the scale factor for screenshots.
    void
    setTransparentBackground(boolean transparentBackground)
    Sets whether the screenshot background should be transparent.
    void
    Triggers the screenshot task in a background thread.
  • Method Details

    • takeScreenshot

      void takeScreenshot()
      Triggers the screenshot task in a background thread. This method returns immediately.
    • setScaleFactor

      void setScaleFactor(int scaleFactor)
      Sets the scale factor for screenshots.
      Parameters:
      scaleFactor - the scale factor
    • setTransparentBackground

      void setTransparentBackground(boolean transparentBackground)
      Sets whether the screenshot background should be transparent.
      Parameters:
      transparentBackground - true if the background is transparent
    • setAutoSave

      void setAutoSave(boolean autoSave)
      Sets whether the screenshot should be automatically saved to disk, or if a file chooser should be shown.
      Parameters:
      autoSave - true if the screenshot is auto-saved
    • setDefaultDirectory

      void setDefaultDirectory(File directory)
      Sets the default directory for saving screenshots.
      Parameters:
      directory - the default directory