This interface is exposed by the underlying window system platform to enable control of platform DnD operations
133134135136137138139140141142
* <P> * @throws InvalidDnDOperationException if a drop is not outstanding/extant */ public void dropComplete(boolean success) throws InvalidDnDOperationException{ DropTargetContextPeer peer = getDropTargetContextPeer(); if (peer != null) { peer.dropComplete(success); } }
146147148149150151152153154155
* <P> * @param dragOperation the supported action(s) */ protected void acceptDrag(int dragOperation) { DropTargetContextPeer peer = getDropTargetContextPeer(); if (peer != null) { peer.acceptDrag(dragOperation); } }
157158159160161162163164165166
/** * reject the Drag. */ protected void rejectDrag() { DropTargetContextPeer peer = getDropTargetContextPeer(); if (peer != null) { peer.rejectDrag(); } }
172173174175176177178179180181
* <P> * @param dropOperation the supported action(s) */ protected void acceptDrop(int dropOperation) { DropTargetContextPeer peer = getDropTargetContextPeer(); if (peer != null) { peer.acceptDrop(dropOperation); } }
184185186187188189190191192193
* 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(); } }
200201202203204205206207
* 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]; }
240241242243244245246247248249250251252253254255256
* <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); } }
114115116117118119120121122123124125126127
* <P> * @param actions an <code>int</code> representing the supported action(s) */ protected void setTargetActions(int actions) { DropTargetContextPeer peer = getDropTargetContextPeer(); if (peer != null) { synchronized (peer) { peer.setTargetActions(actions); getDropTarget().doSetDefaultActions(actions); } } else { getDropTarget().doSetDefaultActions(actions); }
133134135136137138139140141142143
* <P> * @return the current actions acceptable to this <code>DropTarget</code> */ protected int getTargetActions() { DropTargetContextPeer peer = getDropTargetContextPeer(); return ((peer != null) ? peer.getTargetActions() : dropTarget.getDefaultActions() ); }
150151152153154155156157158159