4808793: Allow initiation of drags without local data
Hi
Is anybody working on this bug (http://bugs.sun.com/view_bug.do?bug_id=4808793)?
If not I'd like to have a go at it. My idea is described below.
java.awt.datatransfer.DataFlavor.javaFileListFlavor has drop target
pull semantics, with the drop target being responsible for the
operation on the files. It needs the files to already exist. It's
essentially a "take these files and use them" action. For example, if
you drag files into a Java SVN client, the SVN client could check them
in. These semantics work when the drop target is not the local
filesystem.
But these semantics are exactly the opposite of what's needed when the
files in the drag source are not actual files from the local
filesystem - for example they are files in an FTP server or even
virtual files that don't exist yet. For this we need drag source push
semantics, with the drop target either telling the drag source where
to save the files, or using some sort of protocol to move the file
contents from the drag source to wherever they are to be saved or
used.
Windows, X11 and MacOS all support this latter option, and while it is
a less commonly used file drag scenario, some important applications
require it (eg. Microsoft Outlook) and others support it among other
possible formats (eg. Windows Explorer, GIMP, File Roller). The bug
has been open since early 2003 and has 60 votes; the drag from
Microsoft Outlook to Java bug
(http://bugs.sun.com/view_bug.do?bug_id=6242241) which relies on this
(Continue reading)