Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4357494
Votes 1
Synopsis DropTargetDragEvent.getTransferable() is missing!
Category java:dragndrop
Reported Against 1.3
Release Fixed
State 11-Closed, duplicate of 4378091, request for enhancement
Priority: 5-Very Low
Related Bugs 4378091
Submit Date 28-JUL-2000
Description




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) 
======================================================================
Work Around




Save the transferable node/object in a global field so that it is accessible in
all other drag&drop interface methods. :-(
======================================================================
Evaluation
N/A
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang