Interface ProgramDropProvider


public interface ProgramDropProvider
Generic interface to handle drag and drop.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(Object contextObj, Object data, DataFlavor flavor)
    Adds the dropped data to this drop service.
    Get the data flavors that this drop service accepts.
    int
    Returns the priority of this provider.
    boolean
    Returns true if this service can accept a drop with the specified context.
  • Method Details

    • getPriority

      int getPriority()
      Returns the priority of this provider. Higher priority services will be chosen if there are multiple services that accept the same type in the same context.
    • getDataFlavors

      DataFlavor[] getDataFlavors()
      Get the data flavors that this drop service accepts.
      Returns:
      an array of all DataFlavors that this drop service supports
    • isDropOk

      boolean isDropOk(Object contextObj, DropTargetDragEvent evt)
      Returns true if this service can accept a drop with the specified context.
      Parameters:
      contextObj - The object where the drop will occur
      evt - The event associated with the drop that includes the dropped DataFlavors
    • add

      void add(Object contextObj, Object data, DataFlavor flavor)
      Adds the dropped data to this drop service.
      Parameters:
      contextObj - The object where the drop occurred
      data - The actual data dropped
      flavor - The selected data flavor