JDK-5029432 : Provide a way of getting the action in TransferHandler.importData(...)
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2004-04-09
  • Updated: 2005-05-20
  • Resolved: 2005-05-20
Related Reports
Duplicate :  
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
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
20-05-2005

CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mustang
25-09-2004