I need to copy a ScatterChart in JavaFX 2.0 to the system clipboard. I\'m not really sure how to copy the whole image of the ScatterChart with the potted points.
Gets rid of the need for any bots to take screenshots
/**
* Sets the image content of the clipboard to the chart supplied
* @param chart chart you wish to copy to the clipboard
*/
public void copyChartToClipboard(ScatterChart chart) {
WritableImage image = chart.snapshot(new SnapshotParameters(), null);
ClipboardContent cc = new ClipboardContent();
cc.putImage(image);
Clipboard.getSystemClipboard().setContent(cc);
}