use of org.apache.pivot.wtk.Manifest in project pivot by apache.
the class JSONViewer method paste.
public void paste() {
Manifest clipboardContent = Clipboard.getContent();
if (clipboardContent != null && clipboardContent.containsText()) {
String json = null;
JSONSerializer jsonSerializer = new JSONSerializer();
try {
json = clipboardContent.getText();
setValue(jsonSerializer.readObject(new StringReader(json)));
} catch (Exception exception) {
Prompt.prompt(exception.getMessage(), window);
}
window.setTitle(WINDOW_TITLE);
}
}
Aggregations