use of java.awt.datatransfer.Transferable in project otapij by FellowTraveler.
the class SendTransferDialog method jButton2ActionPerformed.
//GEN-LAST:event_jComboBox1ActionPerformed
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
//GEN-FIRST:event_jButton2ActionPerformed
Transferable clipboardContent = getToolkit().getSystemClipboard().getContents(this);
if ((clipboardContent != null) && (clipboardContent.isDataFlavorSupported(DataFlavor.stringFlavor))) {
try {
String tempString;
tempString = (String) clipboardContent.getTransferData(DataFlavor.stringFlavor);
jTextField1.setText(tempString);
} catch (Exception e) {
e.printStackTrace();
}
}
}
use of java.awt.datatransfer.Transferable in project otapij by FellowTraveler.
the class ServerAcctDialog method jButton4ActionPerformed.
//GEN-LAST:event_jComboBox1ActionPerformed
private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {
//GEN-FIRST:event_jButton4ActionPerformed
Transferable clipboardContent = getToolkit().getSystemClipboard().getContents(this);
if ((clipboardContent != null) && (clipboardContent.isDataFlavorSupported(DataFlavor.stringFlavor))) {
try {
String tempString;
tempString = (String) clipboardContent.getTransferData(DataFlavor.stringFlavor);
jTextField2.setText(tempString);
} catch (Exception e) {
e.printStackTrace();
}
}
}
use of java.awt.datatransfer.Transferable in project otapij by FellowTraveler.
the class WithdrawVoucherDialog method jButton2ActionPerformed.
//GEN-LAST:event_jComboBox1ActionPerformed
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
//GEN-FIRST:event_jButton2ActionPerformed
Transferable clipboardContent = getToolkit().getSystemClipboard().getContents(this);
if ((clipboardContent != null) && (clipboardContent.isDataFlavorSupported(DataFlavor.stringFlavor))) {
try {
String tempString;
tempString = (String) clipboardContent.getTransferData(DataFlavor.stringFlavor);
jTextField1.setText(tempString);
} catch (Exception e) {
e.printStackTrace();
}
}
}
use of java.awt.datatransfer.Transferable in project otapij by FellowTraveler.
the class ProposePaymentDialog method jButton4ActionPerformed.
//GEN-LAST:event_jComboBox1ActionPerformed
private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {
//GEN-FIRST:event_jButton4ActionPerformed
Transferable clipboardContent = getToolkit().getSystemClipboard().getContents(this);
if ((clipboardContent != null) && (clipboardContent.isDataFlavorSupported(DataFlavor.stringFlavor))) {
try {
String tempString;
tempString = (String) clipboardContent.getTransferData(DataFlavor.stringFlavor);
jTextField2.setText(tempString);
} catch (Exception e) {
e.printStackTrace();
}
}
}
use of java.awt.datatransfer.Transferable in project jadx by skylot.
the class MainDropTarget method drop.
@Override
@SuppressWarnings("unchecked")
public void drop(DropTargetDropEvent dtde) {
if (!dtde.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) {
dtde.rejectDrop();
return;
}
dtde.acceptDrop(dtde.getDropAction());
try {
Transferable transferable = dtde.getTransferable();
List<File> transferData = (List<File>) transferable.getTransferData(DataFlavor.javaFileListFlavor);
if (transferData != null && transferData.size() > 0) {
dtde.dropComplete(true);
// load first file
mainWindow.openFile(transferData.get(0));
}
} catch (Exception e) {
LOG.error("File drop operation failed", e);
}
}
Aggregations