United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-5029432 Provide a way of getting the action in TransferHandler.importData(...)
JDK-5029432 : Provide a way of getting the action in TransferHandler.importData(...)

Details
Type:
Enhancement
Submit Date:
2004-04-09
Status:
Closed
Updated Date:
2005-05-20
Project Name:
JDK
Resolved Date:
2005-05-20
Component:
client-libs
OS:
windows_2000
Sub-Component:
javax.swing
CPU:
x86
Priority:
P4
Resolution:
Duplicate
Affected Versions:
1.4.2
Fixed Versions:

Related Reports
Duplicate:

Sub Tasks

Description

Name: rmT116609			Date: 04/08/2004


A DESCRIPTION OF THE REQUEST :
Provide a way of getting the action in TransferHandler.importData(...)

Preferably I would like to have the action also passed into the importData method.  The old importData could be deprecated and have this one call the old one by default so that exisiting code will not be affected.

Another workable solution but not ideal would be to have a method on TransferHandler to get the action that can be called from within importData(...).

For copy and paste this would probably involve including the exported action within the Transferable placed on the clipboard such that the TransferHandler can retrieve it.

For drag and drop the information is already known in the drop(DropTargetDropEvent e) method that calls importData and so would just need to be passed in.

There are already many related changes getting made for Tiger, howver none of them allow me to find out this information.


JUSTIFICATION :
Many of my components are just views of models stored somewhere else.  When we do an import we need to know the action so that we can tell if we need to call a move or a copy in the backend.  Without this information in order to do a move we would need to copy then delete the original which is relatively slow and in general the user wont be able to make duplicate data and hence the copy wouldn't be possible.
(Incident Review ID: 239016) 
======================================================================

                                    

Comments
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
mustang


                                     
2004-09-25
EVALUATION



Name: agR10216			Date: 04/09/2004


This RFE complains of lack of some functionality (that is available by
means of AWT DnD support) in Swing's TransferHandler. Recategorizing to
classes_swing.

###@###.###  2004-04-09


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

Yes, we need to provide enhanced versions of some of the TransferHandler methods.
###@###.### 2004-04-26

This will be fixed by 4942851 which will add overloaded versions of canImport() and importData() that take a new TransferInfo class containing (among other things) the drop action. This action will only be provided for drag and drop as it doesn't make sense and therefore isn't available for clipboard transfers. Closing as a duplicate.
###@###.### 2005-05-20 15:33:34 GMT
                                     
2005-05-20



Hardware and Software, Engineered to Work Together