-
Enhancement
-
Resolution: Duplicate
-
P4
-
None
-
1.4.2
-
x86
-
windows_xp
Name: rmT116609 Date: 10/15/2003
A DESCRIPTION OF THE REQUEST :
No way for a Java application/applet to get the Transferable as a TargetListener, but it is almost possible with the DropTargetContext:
DropTargetDragEvent.getDropTargetContext().getTransferable(), but the access is protected, whereas the 'symmetrical' DragSourceContext.getTransferable() is public...incredible!
JUSTIFICATION :
The problem is when the program needs data from the Transferable in order to 'know' whether the drop would be possible or not, and/or, in order to present data from the Transferable before the drop (the user would have a preview of what the drop would do).
Anyway, why putting such limitations as the DropTargetContext knows the TransferableProxy (which knows the Transferable istelf)?
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
DropTargetContext.getTransferable() declared as public
ACTUAL -
DropTargetContext.getTransferable() is declared protected and there is no 'clean' way to bypass that as DropTargetContext has no public constructor (it is not possible to construct an extended context which would add the behavior)
---------- BEGIN SOURCE ----------
Change in the java.awt.dnd.DropTargetContext:
public Transferable getTransferable() { ... }
---------- END SOURCE ----------
(Incident Review ID: 185307)
======================================================================
- duplicates
-
JDK-4378091 Please add DropTargetDragEvent.getTransferable() method
- Resolved
- relates to
-
JDK-4248542 DropTargetListener can't access the transferable in dragOver and dragEnter
- Resolved