Java Fx Drag and Drop to windows explorer - gestureTarget is always null / explorer should wait

304 Views Asked by At

I have some problems with implementing drag & drop from my project to explorer. In my project i have access to some cloud storages e.g. dropbox. The problem: when i'm starting drag and drop i don't know if the file should be dropped in my project or in explorer. So if the file is dropped in my project i don't need any download but if the file is dropped in explorer i have to start a download.

Is there a way to tell the os that it should wait for an action in the onDragDone function? Alternatively i wanted to get the gestureTarget so that i know to witch path the file was dropped and start the download afterwards to this path. But even if a file transfer succeded the gestureTarget is always null.

Has anyone had this problem, too? Or has anyone an idea how to solve this problem?

1

There are 1 best solutions below

2
On

Is there a way to tell the os that it should wait for an action in the onDragDone function?

In native langs IAsyncOperation is used. See here and here.

I wanted to get the gestureTarget so that i know to witch path the file was dropped.

There is no way.