Interface GTreeDragNDropHandler

All Superinterfaces:
GTreeTransferHandler
All Known Implementing Classes:
DataTreeDragNDropHandler

public interface GTreeDragNDropHandler extends GTreeTransferHandler
  • Method Details

    • isStartDragOk

      boolean isStartDragOk(List<GTreeNode> dragUserData, int dragAction)
      Return true if the dragUserData can be dragged.
      Parameters:
      dragUserData - data where user is initiating the drag operation
      dragAction - user action for the drag operation
    • getSupportedDragActions

      int getSupportedDragActions()
      Returns the supported Drag actions for this tree. For available actions see DnDConstants.
      Returns:
      the supported Drag actions.
    • isDropSiteOk

      boolean isDropSiteOk(GTreeNode destUserData, DataFlavor[] flavors, int dropAction)
      Return true if the drop site is valid for the given target.
      Parameters:
      destUserData - destination for node being dragged
      flavors - flavor(s) being dragged
      dropAction - user action for drop operation
    • drop

      void drop(GTreeNode destUserData, Transferable transferable, int dropAction)
      Add the given transferable's data to the destination user data.
      Parameters:
      destUserData - destination node for the data.
      transferable - the transferable being dragged whose data will be dropped.
      dropAction - user action for drop operation