Drag Done Screen Coordinates

Dirk Lemmermann dlemmermann at gmail.com
Fri Sep 29 15:46:59 UTC 2023


Hi there,

our application uses drag and drop to move an item out of a stage and onto the desktop. We then want to show a new stage showing the item. For this we need the screen coordinates when the drag and drop is „done“. However, those coordinates are always 0 / 0. I found this bug report [0] mentioning it and the conclusion / the analysis was, that it was sufficient that the „dragDropped“ event already contains the coordinates. I think this is wrong. The problem is that the „dropped“ event gets called on the node where the drop happens, and not on the node where the drag operation started. However, when dropping on the desktop there is no JavaFX node that could possibly receive the „dragDropped“ event. Correct me if I am wrong.

Our application is using a docking framework and it is really pushing the DnD support. Docking elements can be dragged and dropped within the docking pane, from one docking pane to another, from one stage to another stage, and finally from one stage to the desktop. Everything is working except for the drag to the desktop.

Dirk

[0] https://bugs.openjdk.org/browse/JDK-8094700
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20230929/9dfa05c9/attachment-0001.htm>


More information about the openjfx-dev mailing list