use of javafx.scene.input.Clipboard in project bitsquare by bitsquare.
the class Utilities method copyToClipboard.
public static void copyToClipboard(String content) {
try {
if (content != null && content.length() > 0) {
Clipboard clipboard = Clipboard.getSystemClipboard();
ClipboardContent clipboardContent = new ClipboardContent();
clipboardContent.putString(content);
clipboard.setContent(clipboardContent);
}
} catch (Throwable e) {
log.error("copyToClipboard failed " + e.getMessage());
e.printStackTrace();
}
}
use of javafx.scene.input.Clipboard in project trex-stateless-gui by cisco-system-traffic-generator.
the class LogsView method copyToClipboard.
/**
* Copy logs to clipboard
*/
public void copyToClipboard() {
final Clipboard clipboard = Clipboard.getSystemClipboard();
final ClipboardContent content = new ClipboardContent();
content.putString(sb.toString());
clipboard.setContent(content);
}
Aggregations