[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Re: Drag Done Screen Coordinates
From:       Andy Goryachev <andy.goryachev () oracle ! com>
Date:       2023-09-29 16:16:29
Message-ID: DM5PR1001MB217278656B622A428FFAC8F9E5C0A () DM5PR1001MB2172 ! namprd10 ! prod ! outlook ! com
[Download RAW message or body]

I had the same problem with my docking framework [0], which was initially i=
mplemented using DnD.  There were other problems which could not be solved =
at the time, so I had to switch to a more low-level implementation using fl=
oating stages and event handlers.

-andy

[0] https://github.com/andy-goryachev/FxDock



From: openjfx-dev <openjfx-dev-retn@openjdk.org> on behalf of Dirk Lemmerma=
nn <dlemmermann@gmail.com>
Date: Friday, September 29, 2023 at 08:47
To: openjfx-dev <openjfx-dev@openjdk.org>
Subject: Drag Done Screen Coordinates
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 =84done=93. 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 =
=84dragDropped=93 event already contains the coordinates. I think this is w=
rong. The problem is that the =84dropped=93 event gets called on the node w=
here 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 =84dragDropped=93 event. Correct me if I am wrong.

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

Dirk

[0] https://bugs.openjdk.org/browse/JDK-8094700

[Attachment #3 (text/html)]

<html xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:"Iosevka Fixed SS16";
	panose-1:2 0 5 9 3 0 0 0 0 4;}
@font-face
	{font-family:"Times New Roman \(Body CS\)";
	panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	font-size:10.0pt;
	font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
span.EmailStyle18
	{mso-style-type:personal-reply;
	font-family:"Iosevka Fixed SS16";
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;
	mso-ligatures:none;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple" \
style="word-wrap:break-word;overflow-wrap: break-word;-webkit-nbsp-mode: \
space;line-break:after-white-space"> <div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Iosevka Fixed \
SS16&quot;">I had the same problem with my docking framework [0], which was initially \
implemented using DnD.&nbsp; There were other problems which could not be solved at \
the time, so I had  to switch to a more low-level implementation using floating \
stages and event handlers.<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Iosevka Fixed \
SS16&quot;"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Iosevka Fixed \
SS16&quot;">-andy<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Iosevka Fixed \
SS16&quot;"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Iosevka Fixed SS16&quot;">[0] <a \
href="https://github.com/andy-goryachev/FxDock">https://github.com/andy-goryachev/FxDock</a><o:p></o:p></span></p>
 <p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Iosevka Fixed \
SS16&quot;"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Iosevka Fixed \
SS16&quot;"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Iosevka Fixed \
SS16&quot;"><o:p>&nbsp;</o:p></span></p> <div \
id="mail-editor-reference-message-container"> <div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span \
style="font-size:12.0pt;color:black">From: </span></b><span \
style="font-size:12.0pt;color:black">openjfx-dev &lt;openjfx-dev-retn@openjdk.org&gt; \
on behalf of Dirk Lemmermann &lt;dlemmermann@gmail.com&gt;<br> <b>Date: </b>Friday, \
September 29, 2023 at 08:47<br> <b>To: </b>openjfx-dev \
&lt;openjfx-dev@openjdk.org&gt;<br> <b>Subject: </b>Drag Done Screen \
Coordinates<o:p></o:p></span></p> </div>
<p class="MsoNormal"><span style="font-size:11.0pt">Hi there,<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p>&nbsp;</o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">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.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p>&nbsp;</o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">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.<o:p></o:p></span></p> </div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p>&nbsp;</o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">Dirk<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p>&nbsp;</o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">[0]&nbsp;<a \
href="https://bugs.openjdk.org/browse/JDK-8094700">https://bugs.openjdk.org/browse/JDK-8094700</a><o:p></o:p></span></p>
 </div>
</div>
</div>
</div>
</body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic