private void processDrop(DropData dropData, DropTargetDropEvent dropTargetDropEvent) { putEntryAtPoint(dropData.whatToDrop, dropData.whereInTable); _widget.addEntry(dropData.whatToDrop); _underlyingTable.setRowSelectionInterval(dropData.whereInTable.x, dropData.whereInTable.x); _underlyingTable.setColumnSelectionInterval(dropData.whereInTable.y, dropData.whereInTable.y); dropTargetDropEvent.acceptDrop(dropTargetDropEvent.getDropAction()); dropTargetDropEvent.dropComplete(true); }
public void drop(DropTargetDropEvent dropTargetDropEvent) { DropData dropData = convertEventIntoDropData(dropTargetDropEvent); if (null == dropData) { dropTargetDropEvent.rejectDrop(); } else { int dropAction = dropTargetDropEvent.getDropAction(); if (DnDConstants.ACTION_MOVE == dropAction) { _widget.removeEntry(dropData.whatToDrop); processDrop(dropData, dropTargetDropEvent); } if (DnDConstants.ACTION_COPY == dropAction) { dropData.whatToDrop = RecursiveCopy.recursivelyCopyInstance( dropData.whatToDrop, Constants.RECURSIVE_COPY_DEPTH_FOR_DND); processDrop(dropData, dropTargetDropEvent); } } _widget.setIsCurrentlyDragging(false); return; }