This interface is exposed by the underlying window system platform to enable control of platform DnD operations
163164165166167168169170171172
* <P> * @param dragOperation the supported action(s) */ protected void acceptDrag(int dragOperation) { DropTargetContextPeer peer = getDropTargetContextPeer(); if (peer != null) { peer.acceptDrag(dragOperation); } }
174175176177178179180181182183
/** * reject the Drag. */ protected void rejectDrag() { DropTargetContextPeer peer = getDropTargetContextPeer(); if (peer != null) { peer.rejectDrag(); } }
189190191192193194195196197198
* <P> * @param dropOperation the supported action(s) */ protected void acceptDrop(int dropOperation) { DropTargetContextPeer peer = getDropTargetContextPeer(); if (peer != null) { peer.acceptDrop(dropOperation); } }
201202203204205206207208209210
* called to signal that the drop is unacceptable. * must be called during DropTargetListener.drop method invocation. */ protected void rejectDrop() { DropTargetContextPeer peer = getDropTargetContextPeer(); if (peer != null) { peer.rejectDrop(); } }
217218219220221222223224
* supported <code>DataFlavor</code>s of the * <code>Transferable</code> operand. */ protected DataFlavor[] getCurrentDataFlavors() { DropTargetContextPeer peer = getDropTargetContextPeer(); return peer != null ? peer.getTransferDataFlavors() : new DataFlavor[0]; }
257258259260261262263264265266267268269270271272273
* <P> * @return the <code>Transferable</code> */ protected Transferable getTransferable() throws InvalidDnDOperationException { DropTargetContextPeer peer = getDropTargetContextPeer(); if (peer == null) { throw new InvalidDnDOperationException(); } else { if (transferable == null) { Transferable t = peer.getTransferable(); boolean isLocal = peer.isTransferableJVMLocal(); synchronized (this) { if (transferable == null) { transferable = createTransferableProxy(t, isLocal); } }
117118119120121122123124
if(component == null) { return; } DTK dtk = DTK.getDTK(); DropTargetContextPeer dtp = dtk.createDropTargetContextPeer(context); context.addNotify(dtp); }
118119120121122123124125
121122123124125126127128129
if(component == null) { return; } DTK dtk = DTK.getDTK(); DropTargetContextPeer dtp = dtk.createDropTargetContextPeer(context); context.addNotify(dtp); // TODO: implement }