>> In your Transferrable subclass, have getTransferData() create
>> and write the temporary files.
>
> Oops, I meant Transferrable implementation class, of course.
Same thing. I use "subclass" for implementing classes of interfaces as a
synonym for "subtype".

Signature
Lew
On 22 Jun., 16:10, "Larry Barowski" <MElarrybar-AT-
eng_DOT_auburnANOTHERDOTeduEND> wrote:
> > In your Transferrable subclass, have getTransferData() create
> > and write the temporary files.
>
> Oops, I meant Transferrable implementation class, of course.
Hi, iam a little bit confused :/
I also had overwritten the getTransferData() and return a List<File>;
For Example i have my temporary File in this List: new File("/tmp/
empty.txt");
Now the File will be droped to an unknown Location "on the Filesystem
(not in my App!)".
After this Drop the File i got in the List also have the Path /tmp/
empty.txt
The same in exportDone(), Filepath is the old one, not the new one!
Should i return something other in getTransferData() ??
Thanks for your Help!
Larry Barowski - 23 Jun 2007 14:42 GMT
> Hi, iam a little bit confused :/
> I also had overwritten the getTransferData() and return a List<File>;
[quoted text clipped - 7 lines]
>
> Should i return something other in getTransferData() ??
You want to preserve the filenames, so create a temporary directory
and put them there with the actual names. That's what WinZip does.
My first thought when I needed to do this was "Well, how does
WinZip do it?". You can use System.getProperty("java.io.tmpdir") to
figure out where to put your temporary directory. Whatever app you
drop into will either copy from there or open from there.
dbhomers@becker-print-soft.com - 24 Jun 2007 18:58 GMT
On 23 Jun., 15:45, "Larry Barowski" <MElarrybar-AT-
eng_DOT_auburnANOTHERDOTeduEND> wrote:
> <dbhom...@becker-print-soft.com> wrote in message
>
[quoted text clipped - 18 lines]
> figure out where to put your temporary directory. Whatever app you
> drop into will either copy from there or open from there.
Yes, thats right! But that is not my intention to do!
Right now, i do it exactly that way and as i said in my first message:
"... I only can extract the files when the User starts dragging. If i
had to extract an 10 MB file the user must wait a minute until he can
release the Button ..."
What i need is a solution to extract between "User Released
Mousebutton" and "Filesystem will copy files" OR
find out the Drop-Location.
After playing a little bit with SunDragSourceContextPeer i think its
not possible to do that with Core-Java.
I think i will try if i can write a C-Library which can spy File-Drops
to System and than find out the location via active Window etc.
Larry Barowski - 25 Jun 2007 15:01 GMT
> Yes, thats right! But that is not my intention to do!
> Right now, i do it exactly that way and as i said in my first message:
[quoted text clipped - 10 lines]
> I think i will try if i can write a C-Library which can spy File-Drops
> to System and than find out the location via active Window etc.
Ah, I didn't realize getTransferData() was called as soon as
a valid drop target is identified (but before the drop). I suppose
the targets need that if they display something about the
nature of the items to be dropped on mouse-over. I don't see
any way to tell the difference between a mouse-over and
actual drop. The methods in the call stack are identical for
both, and the line numbers are mostly unknown.