public void actionPerformed(ActionEvent ev) {
try {
Transferable trans = t.paste();
Clipboard clipboard = getClipboard();
if (trans != null) {
ClipboardOwner owner = (trans instanceof ClipboardOwner) ? (ClipboardOwner) trans
: new StringSelection(""); // NOI18N
clipboard.setContents(trans, owner);
}
} catch (UserCancelException exc) {
// ignore - user just pressed cancel in some dialog....
} catch (IOException e) {
Exceptions.printStackTrace(e);
} finally {
EventQueue.invokeLater(this);
}
}
PasteAction.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:incubator-netbeans
作者:
评论列表
文章目录