use of javafx.scene.input.ClipboardContent in project cryptomator by cryptomator.
the class UnlockedController method didClickCopyUrl.
@FXML
private void didClickCopyUrl(ActionEvent event) {
ClipboardContent clipboardContent = new ClipboardContent();
clipboardContent.putUrl(vault.get().getWebDavUrl());
clipboardContent.putString(vault.get().getWebDavUrl());
Clipboard.getSystemClipboard().setContent(clipboardContent);
}
use of javafx.scene.input.ClipboardContent in project cryptomator by cryptomator.
the class DraggableListCell method onDragDetected.
private void onDragDetected(MouseEvent event) {
if (getItem() == null) {
return;
}
final ClipboardContent content = new ClipboardContent();
content.putString(Integer.toString(getIndex()));
final Image snapshot = this.snapshot(new SnapshotParameters(), null);
final Dragboard dragboard = startDragAndDrop(TransferMode.MOVE);
dragboard.setDragView(snapshot);
dragboard.setContent(content);
event.consume();
}
use of javafx.scene.input.ClipboardContent in project jgnash by ccavanaugh.
the class AboutDialogController method dumpPropertiesToClipboard.
private void dumpPropertiesToClipboard(final TableView<SystemProperty> tableView) {
final StringBuilder buffer = new StringBuilder();
tableView.getSelectionModel().getSelectedItems().stream().filter(systemProperty -> systemProperty.keyProperty().get() != null).forEach(systemProperty -> {
buffer.append(systemProperty.keyProperty().get());
buffer.append("\t");
if (systemProperty.valueProperty().get() != null) {
buffer.append(systemProperty.valueProperty().get());
}
buffer.append("\n");
});
final ClipboardContent content = new ClipboardContent();
content.putString(buffer.toString());
Clipboard.getSystemClipboard().setContent(content);
}
use of javafx.scene.input.ClipboardContent in project jgnash by ccavanaugh.
the class ChartUtilities method copyToClipboard.
static void copyToClipboard(final Pane pane) {
final Clipboard clipboard = Clipboard.getSystemClipboard();
final ClipboardContent content = new ClipboardContent();
content.putImage(takeSnapshot(pane));
clipboard.setContent(content);
}
use of javafx.scene.input.ClipboardContent in project trex-stateless-gui by cisco-system-traffic-generator.
the class ConsoleLogView method copyToClipboard.
/**
* Copy console log to clipboard
*/
public void copyToClipboard() {
// select all text
logsContent.selectAll();
final Clipboard clipboard = Clipboard.getSystemClipboard();
final ClipboardContent content = new ClipboardContent();
content.putString(logsContent.getText());
clipboard.setContent(content);
}
Aggregations