<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META NAME="Generator" CONTENT="MS Exchange Server version rmj.rmm.rup.rpr">
<TITLE>FW: <AWT Dev> [10] JDK-8178361: JFileChooser does not allow to open folders with a double tap when using the touch screen interface</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">Hi Alexey, Please see below for my replies:</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">[</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri">Attachments</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri"> will be shared upon request as they are of considerable size and cannot be sent to AWT dev group because of the email size limitation.</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri">]</FONT></SPAN><SPAN LANG="en-us"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">Thanks and regards,</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">Shashi</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">-----Original Message-----<BR>
From: Alexey Ivanov<BR>
Sent: Friday, September 22, 2017 5:26 PM<BR>
To: Shashidhara Veerabhadraiah <</FONT></SPAN><SPAN LANG="en-us"></SPAN><A HREF="mailto:shashidhara.veerabhadraiah@oracle.com"><SPAN LANG="en-us"><U><FONT COLOR="#0563C1" FACE="Calibri">shashidhara.veerabhadraiah@oracle.com</FONT></U></SPAN><SPAN LANG="en-us"></SPAN></A><SPAN LANG="en-us"><FONT FACE="Calibri">>; Sergey Bylokhov <</FONT></SPAN><SPAN LANG="en-us"></SPAN><A HREF="mailto:sergey.bylokhov@oracle.com"><SPAN LANG="en-us"><U><FONT COLOR="#0563C1" FACE="Calibri">sergey.bylokhov@oracle.com</FONT></U></SPAN><SPAN LANG="en-us"></SPAN></A><SPAN LANG="en-us"><FONT FACE="Calibri">><BR>
Cc:</FONT></SPAN><SPAN LANG="en-us"> </SPAN><A HREF="mailto:awt-dev@openjdk.java.net"><SPAN LANG="en-us"><U><FONT COLOR="#0563C1" FACE="Calibri">awt-dev@openjdk.java.net</FONT></U></SPAN><SPAN LANG="en-us"></SPAN></A><SPAN LANG="en-us"><BR>
<FONT FACE="Calibri">Subject: Re: <AWT Dev</FONT><FONT FACE="Calibri">> [10] JDK-8178361: JFileChooser does not allow to open folders with a double tap when using the touch screen interface</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">Hi Shashi,</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">On 19/09/2017 04:35, Shashidhara Veerabhadraiah wrote:</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">> Hi Sergey, When I checked it was not working on the Java applications. None of the controls could take touch click events but it used to highlight because when we touch on the touch screen interface the system moves the cursor over to the touch point th</FONT><FONT FACE="Calibri">e</FONT><FONT FACE="Calibri">reby enabling mouse focus events being sent.</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">I cannot grasp the meaning of this sentence.</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">What are touch click events?</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><B><I><FONT FACE="Calibri">[Shashi]</FONT> <FONT FACE="Calibri">Below are the related macros:</FONT></I></B></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT COLOR="#000000" FACE="Courier New">#define WM_LBUTTONDOWN                  0x0201</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT COLOR="#000000" FACE="Courier New">#define WM_LBUTTONDBLCLK                0x0203</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><B><I></I></B></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT COLOR="#000000" FACE="Courier New">#</FONT><FONT COLOR="#000000" FACE="Courier New">define WM_POINTERDOWN                   0x0246</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><B><I></I></B></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><B><I><FONT FACE="Calibri">[Shashi]</FONT></I></B></SPAN><SPAN LANG="en-us"> <FONT FACE="Calibri"> More appropriately, touch double tap events. On a technical note, whenever I did a double tap touch on the folder I could get WM_POINTERDOWN(0x0246) and none of the left button down or left button d</FONT><FONT FACE="Calibri">ouble click events. I have attached the proof for the same captured as text file(for both touch double tap and a mouse double click events). Please note that this behavior is seen after the removal of</FONT></SPAN><SPAN LANG="en-us"> EnableMouseInPointer() as it is<I><U> not</U></I> required anymore(Please see for the reply to your other email). I could not get left double click event but instead only the left button down events via the mouse double click. I think we use the time gap between the left button down events and then convert to a double click event internally.</SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><B><I><FONT COLOR="#000000" FACE="Calibri">[Shashi]</FONT> <FONT COLOR="#000000" FACE="Calibri">So in a way we can conclude that after we do a touch double tap action there was no left button down events that we received. Please note that this is the behavior if we do a double tap touch</FONT></I></B></SPAN><SPAN LANG="en-us"><B><I><U> <FONT COLOR="#000000" FACE="Calibri">on</FONT></U></I></B></SPAN><SPAN LANG="en-us"><B><I><FONT COLOR="#000000" FACE="Calibri"> the file icon.</FONT></I></B></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">What are mouse fo</FONT><FONT FACE="Calibri">cus events?</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><B><I><FONT COLOR="#000000" FACE="Calibri">[Shashi]</FONT> <FONT COLOR="#000000" FACE="Calibri">Since there are 2 components in the file chooser. One is the icon and another is the file name. In the Java implementation the file chooser dialog has the icon representations being pretty small and usually it is difficult to exactly t</FONT><FONT COLOR="#000000" FACE="Calibri">ap on the icon!! If there is a touch tap onto the file name we do receive left button down and as well as pointer down messages. I have attached a file containing the proof of it for the same.</FONT></I></B></SPAN><SPAN LANG="en-us"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><B><I><FONT COLOR="#000000" FACE="Calibri">[Shashi]</FONT> <FONT COLOR="#000000" FACE="Calibri">This is actually a surprise for me and also tells me</FONT> <FONT COLOR="#000000" FACE="Calibri">that the type of an icon component and the file name components are having different behaviors. I am not sure how I can change this behavior of the icon component.</FONT></I></B></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Arial" SIZE=2 COLOR="#000000"> <<...>> </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT COLOR="#000000" FACE="Calibri">With this fix, we can touch on all the ico</FONT><FONT COLOR="#000000" FACE="Calibri">ns as highlighted above and have the required actions being performed as expected, which was</FONT></SPAN><SPAN LANG="en-us"><I><U> <FONT COLOR="#000000" FACE="Calibri">not</FONT></U></I></SPAN><SPAN LANG="en-us"><FONT COLOR="#000000" FACE="Calibri"> happening earlier.</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">So the fix is not JFileChooser-specific, is it?</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><B><I><FONT COLOR="#000000" FACE="Calibri">[Shashi]</FONT> <FONT COLOR="#000000" FACE="Calibri">No it is not. It enables the touch for all the components.</FONT></I></B></SPAN><SPAN LANG="en-us"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">Regards,</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">Alexey</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">></FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">> Thanks and regards,</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">> Shashi</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">></FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">> -----Original Message-----</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">> From: Sergey Bylokhov</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">> Sent: Tuesday, September 19, 2017 3:39 AM</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">> To:</FONT></SPAN><SPAN LANG="en-us"> </SPAN><A HREF="mailto:shashidhara.veerabhadraiah@oracle.com"><SPAN LANG="en-us"><FONT FACE="Calibri">shashidhara.veerabhadraiah@oracle.com</FONT></SPAN><SPAN LANG="en-us"></SPAN></A><SPAN LANG="en-us"><FONT FACE="Calibri"> >> Shashidhara </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">> Vee</FONT><FONT FACE="Calibri">rabhadraiah <</FONT></SPAN><SPAN LANG="en-us"></SPAN><A HREF="mailto:shashidhara.veerabhadraiah@oracle.com"><SPAN LANG="en-us"><FONT FACE="Calibri">shashidhara.veerabhadraiah@oracle.com</FONT></SPAN><SPAN LANG="en-us"></SPAN></A><SPAN LANG="en-us"><FONT FACE="Calibri">></FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">> Cc:</FONT></SPAN><SPAN LANG="en-us"> </SPAN><A HREF="mailto:awt-dev@openjdk.java.net"><SPAN LANG="en-us"><FONT FACE="Calibri">awt-dev@openjdk.java.net</FONT></SPAN><SPAN LANG="en-us"></SPAN></A><SPAN LANG="en-us"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">> Subject: Re: <AWT Dev> [10] JDK-8178361: JFileChooser does not</FONT><FONT FACE="Calibri"> allow </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">> to open folders with a double tap when using the touch screen </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">> interface</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">></FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">> Hi, Shashi.</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">> Why the bug is JFileChooser specific?</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">> Does it means that it works for other elements(buttons/lists/menu/etc)?</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">></FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">> On 9/18/17 08:58, Shashidhara Veerabh</FONT><FONT FACE="Calibri">adraiah wrote:</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>> Hi All, Please review this software changes for the /_enhancement_/ </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>> JDK-8178361.</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>></FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>> Issue: Request was filed to enable the touch event processing for </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>> Java client applications.</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>></FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>> Fix: Windows platform offers 'pointer' implem</FONT><FONT FACE="Calibri">entation thro' which one </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>> can tap for the touch inputs as well. A typical 'pointer' function </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>> may contain touch, pen, touch pad or mouse inputs. This allows for a </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>> uniform input processing though the event source may defer. This fix </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>> enables the 'touch' events(via TOUCH pointer) to be passed to the </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>> components using the other type of pointer 'mouse'. Essentially there </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>> is a conversion put in place to convert a touch event input into a </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>> left click mouse event. I think this i</FONT><FONT FACE="Calibri">s the right thing to do </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>> considering desktop scenarios to which the typical Java applications </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>> that gets exposed to. This is also the same behavior on my touch </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>> enabled windows 10 laptop as well. Please let me know if a different behavior is expec</FONT><FONT FACE="Calibri">ted. Below is the output:</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>></FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>> Now touch event works as a typical mouse left click as in general. </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>> But there is an issue because the icon size of the Java UI is </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>> typically small, touching that icon exactly is sometimes difficult. </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>> This is handled</FONT><FONT FACE="Calibri"> by an Windows application by having larger icon size </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>> or icon view as a standard. Hence I believe this is outside the scope </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>> this software update. Any changes to it would be done later as a new </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>> bug or an enhancement.</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>></FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>> Bug ID:</FONT></SPAN><SPAN LANG="en-us"> </SPAN><A HREF="https://bugs.openjdk.java.net/browse/JDK-8178361"><SPAN LANG="en-us"><FONT FACE="Calibri">https://bugs.openjdk.java.net/browse/JDK-8178361</FONT></SPAN><SPAN LANG="en-us"></SPAN></A><SPAN LANG="en-us"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>></FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>> Webrev:</FONT></SPAN><SPAN LANG="en-us"> </SPAN><A HREF="http://cr.openjdk.java.net/~sveerabhadra/8178361/webrev.00/"><SPAN LANG="en-us"><FONT FACE="Calibri">http://cr.openjdk.java.net/~sveerabhadra/8178361/webrev.00/</FONT></SPAN><SPAN LANG="en-us"></SPAN></A><SPAN LANG="en-us"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>></FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>></FONT> <FONT FACE="Calibri">Thanks and regards,</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>></FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>> Shashi</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">>></FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">></FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">> --</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">> Best regards, Sergey.</FONT></SPAN></P>
<BR>

</BODY>
</HTML>