Package org.gephi.visualization.api
Interface ScreenshotController
public interface ScreenshotController
Controller for taking screenshots of the visualization.
- Author:
- Mathieu Bastian
-
Method Summary
Modifier and TypeMethodDescriptionvoidsetAutoSave(boolean autoSave) Sets whether the screenshot should be automatically saved to disk, or if a file chooser should be shown.voidsetDefaultDirectory(File directory) Sets the default directory for saving screenshots.voidsetScaleFactor(int scaleFactor) Sets the scale factor for screenshots.voidsetTransparentBackground(boolean transparentBackground) Sets whether the screenshot background should be transparent.voidTriggers 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
Sets the default directory for saving screenshots.- Parameters:
directory- the default directory
-