JDK-5018712 : NO WAY TO TELL WHAT IS BEING DRAGGED UNTIL DROP OCCURS
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.1
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2004-03-23
  • Updated: 2004-03-24
  • Resolved: 2004-03-24
Related Reports
Duplicate :  
Relates :  
Description

Name: rv122619			Date: 03/23/2004

We use drag and drop in several places in some Java applications.  For example, in the custom tree, we allow dragging of nodes to provide organization of the nodes. In this case, there are some nodes you can never drop on and there are some nodes you can drop on only if the dragged objects pass certain criteria.  The drag operation may start outside of the custom tree.  There is no way to get what the dragged objects are in dragEnter and dragOver methods of the DropTargetListener.  Simply put, there is no getTransferable method on DropTargetDragEvent.

Source code for demonstration can be found in Bug ID 5018702.


======================================================================

Comments
WORK AROUND Name: rv122619 Date: 03/23/2004 So we have so far handled this by displaying error messages after allowing bad drops. It would be much better if we could just reject the drop and have the cursor shape change (See Bug ID 5018702). ======================================================================
24-08-2004

EVALUATION Why isn't the transferable available to the drop target during a drag? Making it available is also necessary to fix Swing bug 4942851. ###@###.### 2004-03-23 Wow, looks like it is now available - added as bug 4378091 in tiger. I'll let drag&drop confirm this and close it out then. ###@###.### 2004-03-23 Name: agR10216 Date: 03/24/2004 Duplicate of 4378091: Please add DropTargetDragEvent.getTransferable() method. ###@###.### 2004-03-24 ======================================================================
24-03-2004