List of usage examples for java.awt.dnd DropTargetDropEvent isLocalTransfer
public boolean isLocalTransfer()
From source file:net.sf.nmedit.nordmodular.NMSynthDeviceContext.java
protected void dropTransfer(SlotObject<NordModular> s, DropTargetDropEvent dtde) { if (!acceptsDropData(s, dtde.getCurrentDataFlavors())) { dtde.rejectDrop();/*from w ww . ja va 2s . c o m*/ return; } if (!dtde.isLocalTransfer()) { dtde.rejectDrop(); return; } try { NMPatch patch = (NMPatch) dtde.getTransferable().getTransferData(JTNMPatch.nmPatchFlavor); if (patch.getSlot() != null) patch.setSlot(null); (new StorePatchInSlotWorker((NmSlot) s.getSlot(), patch)).store(); } catch (IOException e) { dtde.rejectDrop(); } catch (UnsupportedFlavorException e) { dtde.rejectDrop(); } }