Package Summary  Overview Summary

class:DropTargetContext [NONE]

  • All Implemented Interfaces:

    public class DropTargetContext
    extends Object
    implements Serializable
    A DropTargetContext is created whenever the logical cursor associated with a Drag and Drop operation coincides with the visible geometry of a Component associated with a DropTarget. The DropTargetContext provides the mechanism for a potential receiver of a drop operation to both provide the end user with the appropriate drag under feedback, but also to effect the subsequent data transfer if appropriate.
    See Also:
    Serialized Form

method:getDropTarget() [NONE]

  • getDropTarget

    public DropTarget getDropTarget()
    This method returns the DropTarget associated with this DropTargetContext.
    the DropTarget associated with this DropTargetContext

method:getComponent() [NONE]

  • getComponent

    public Component getComponent()
    This method returns the Component associated with this DropTargetContext.
    the Component associated with this Context

method:setTargetActions(int) [NONE]

  • setTargetActions

    protected void setTargetActions​(int actions)
    This method sets the current actions acceptable to this DropTarget.
    actions - an int representing the supported action(s)

method:getTargetActions() [NONE]

  • getTargetActions

    protected int getTargetActions()
    This method returns an int representing the current actions this DropTarget will accept.
    the current actions acceptable to this DropTarget

method:dropComplete(boolean) [NONE]

  • dropComplete

    public void dropComplete​(boolean success)
                      throws InvalidDnDOperationException
    This method signals that the drop is completed and if it was successful or not.
    success - true for success, false if not
    InvalidDnDOperationException - if a drop is not outstanding/extant

method:acceptDrag(int) [NONE]

  • acceptDrag

    protected void acceptDrag​(int dragOperation)
    accept the Drag.
    dragOperation - the supported action(s)

method:rejectDrag() [NONE]

  • rejectDrag

    protected void rejectDrag()
    reject the Drag.

method:acceptDrop(int) [NONE]

  • acceptDrop

    protected void acceptDrop​(int dropOperation)
    called to signal that the drop is acceptable using the specified operation. must be called during DropTargetListener.drop method invocation.
    dropOperation - the supported action(s)

method:rejectDrop() [NONE]

  • rejectDrop

    protected void rejectDrop()
    called to signal that the drop is unacceptable. must be called during DropTargetListener.drop method invocation.

method:getCurrentDataFlavors() [NONE]

  • getCurrentDataFlavors

    protected DataFlavor[] getCurrentDataFlavors()
    get the available DataFlavors of the Transferable operand of this operation.
    a DataFlavor[] containing the supported DataFlavors of the Transferable operand.

method:getCurrentDataFlavorsAsList() [NONE]

  • getCurrentDataFlavorsAsList

    protected List<DataFlavor> getCurrentDataFlavorsAsList()
    This method returns a the currently available DataFlavors of the Transferable operand as a java.util.List.
    the currently available DataFlavors as a java.util.List

method:isDataFlavorSupported(java.awt.datatransfer.DataFlavor) [NONE]

  • isDataFlavorSupported

    protected boolean isDataFlavorSupported​(DataFlavor df)
    This method returns a boolean indicating if the given DataFlavor is supported by this DropTargetContext.
    df - the DataFlavor
    if the DataFlavor specified is supported

method:getTransferable() [NONE]

method:createTransferableProxy(java.awt.datatransfer.Transferable,boolean) [NONE]

  • createTransferableProxy

    protected Transferable createTransferableProxy​(Transferable t,
                                                   boolean local)
    Creates a TransferableProxy to proxy for the specified Transferable.
    t - the Transferable to be proxied
    local - true if t represents the result of a local drag-n-drop operation.
    the new TransferableProxy instance.

© 2019 Oracle Corporation and/or its affiliates