Class TransferHandler.TransferSupport

java.lang.Object
vaadinx.swing.TransferHandler.TransferSupport
Enclosing class:
TransferHandler

public static final class TransferHandler.TransferSupport extends Object
Emulator for TransferHandler.TransferSupport. Carries the target component, the dragged Transferable, and (for drops) the drop location + action negotiation. Built by the DnD bridge for drops and by TransferHandler.importData(JComponent, Transferable) for the paste case.
  • Constructor Details

    • TransferSupport

      public TransferSupport(Component component, Transferable transferable)
      Paste-shape support: not a drop, no location.
  • Method Details

    • getComponent

      public Component getComponent()
      The drop/paste target component.
    • getTransferable

      public Transferable getTransferable()
    • getDataFlavors

      public DataFlavor[] getDataFlavors()
    • isDataFlavorSupported

      public boolean isDataFlavorSupported(DataFlavor df)
    • isDrop

      public boolean isDrop()
      True when this support describes a drop (vs. a paste).
    • getDropLocation

      public TransferHandler.DropLocation getDropLocation()
      Component-specific drop location, or null for a paste.
    • getSourceDropActions

      public int getSourceDropActions()
    • getUserDropAction

      public int getUserDropAction()
    • getDropAction

      public int getDropAction()
    • setDropAction

      public void setDropAction(int dropAction)
      Chooses the action to perform among getSourceDropActions().
    • setShowDropLocation

      public void setShowDropLocation(boolean showDropLocation)