JDK-4357494 : DropTargetDragEvent.getTransferable() is missing!
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.3.0
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_nt
  • CPU: x86
  • Submitted: 2000-07-28
  • Updated: 2000-12-10
  • Resolved: 2000-12-10
Related Reports
Duplicate :  
Description

Name: skT45625			Date: 07/28/2000


java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

I've written a JTree that supports drag&drop. I implemented the
DropTargetListener.dragOver(DropTargetDragEvent) that it selects the current
node that the dragging node moves over. Now, I want to check if this
current/selected node is a valid drop target (node). For this reason, I need to
get the current transferable to check wether source and target nodes
are "compatible". For this reason I did a DropTargetDragEvent.getTransferable()
(just like DropTargetDropEvent.getTransferable()) but this method is not
available in DropTargetDragEvent! Playing with different DataFlavors is not
enough, there are objects of the same flavour but with different properties.
And the dropping sequence is dependend on this properties, so I need to have
the transferable to check for additional values.

Can we expect to have DropTargetDragEvent.getTransferable() in the next SDK or
is there another solution for this problem?
(Review ID: 107698) 
======================================================================

Comments
WORK AROUND Name: skT45625 Date: 07/28/2000 Save the transferable node/object in a global field so that it is accessible in all other drag&drop interface methods. :-( ======================================================================
11-06-2004