{"id":516,"date":"2013-07-03T21:26:53","date_gmt":"2013-07-03T19:26:53","guid":{"rendered":"http:\/\/www.jensd.de\/wordpress\/?p=516"},"modified":"2013-10-14T13:06:19","modified_gmt":"2013-10-14T11:06:19","slug":"javafx-8-embedded-currently-untouchable","status":"publish","type":"post","link":"https:\/\/www.jensd.de\/wordpress\/?p=516","title":{"rendered":"JavaFX 8 embedded currently &#8216;untouchable&#8217;?"},"content":{"rendered":"<p>[UPDATE]<br \/>\n<a href=\"http:\/\/www.jensd.de\/wordpress\/?p=845\" title=\"Solved: eGalax Touch Screen issues with JavaFX (on Raspberry Pi)\">Solved: eGalax Touch Screen issues with JavaFX (on Raspberry Pi)<\/a><\/p>\n<p>Hi all,<\/p>\n<p>yesterday I recevied my 7&#8243; touch screen. I immediately started to give it a try. In the end spend the night with getting it work with my RasPi.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_61 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a08141d58f07\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a08141d58f07\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.jensd.de\/wordpress\/?p=516\/#First_with_X11\" title=\"First with X11\">First with X11<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.jensd.de\/wordpress\/?p=516\/#Installed_pre-configured_kernel_with_eGalax_touch_screen_support_Works\" title=\"Installed pre-configured kernel with eGalax touch screen support: Works!\">Installed pre-configured kernel with eGalax touch screen support: Works!<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.jensd.de\/wordpress\/?p=516\/#startx_Works\" title=\"startx: Works!\">startx: Works!<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.jensd.de\/wordpress\/?p=516\/#Now_the_really_interesting_part_JavaFX\" title=\"Now the really interesting part: JavaFX\">Now the really interesting part: JavaFX<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.jensd.de\/wordpress\/?p=516\/#Sadly_nothing_happened\" title=\"Sadly: nothing happened\">Sadly: nothing happened<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h1><span class=\"ez-toc-section\" id=\"First_with_X11\"><\/span>First with X11<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<h2><span class=\"ez-toc-section\" id=\"Installed_pre-configured_kernel_with_eGalax_touch_screen_support_Works\"><\/span>Installed pre-configured kernel with eGalax touch screen support: Works!<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><a href=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2013\/07\/raspi_touch1.pnp_.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"528\" data-permalink=\"https:\/\/www.jensd.de\/wordpress\/?attachment_id=528\" data-orig-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2013\/07\/raspi_touch1.pnp_.png\" data-orig-size=\"988,363\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"raspi_touch1.pnp\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2013\/07\/raspi_touch1.pnp_-300x110.png\" data-large-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2013\/07\/raspi_touch1.pnp_.png\" tabindex=\"0\" role=\"button\" src=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2013\/07\/raspi_touch1.pnp_.png\" alt=\"raspi_touch1.pnp\" width=\"988\" height=\"363\" class=\"aligncenter size-full wp-image-528\" srcset=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2013\/07\/raspi_touch1.pnp_.png 988w, https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2013\/07\/raspi_touch1.pnp_-300x110.png 300w\" sizes=\"(max-width: 988px) 100vw, 988px\" \/><\/a><\/p>\n<h2><span class=\"ez-toc-section\" id=\"startx_Works\"><\/span><code>startx<\/code>: Works!<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h1><span class=\"ez-toc-section\" id=\"Now_the_really_interesting_part_JavaFX\"><\/span>Now the really interesting part: JavaFX<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p>For basic test purposes I added a <code>TouchEventHandler<\/code> to the root pane:<br \/>\n[java]<br \/>\nfinal EventHandler<TouchEvent> exitOnTouchEventHandler =<br \/>\n                new EventHandler<TouchEvent>() {<br \/>\n            @Override<br \/>\n            public void handle(TouchEvent t) {<br \/>\n                System.out.println(t.getTouchPoint().getScreenX());<br \/>\n                System.out.println(t.getTouchPoint().getScreenY());<br \/>\n                Platform.exit();<br \/>\n                t.consume();<br \/>\n            }<br \/>\n        };<\/p>\n<p>        root.setOnTouchPressed(exitOnTouchEventHandler);<br \/>\n        root.setOnTouchReleased(exitOnTouchEventHandler);<br \/>\n[\/java]<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Sadly_nothing_happened\"><\/span>Sadly: nothing happened<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Then I pulled out the USB connection of the touch device and the app closed immediately with compliance of the event loop:<\/p>\n<p><a href=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2013\/07\/raspi_touch2.pnp_.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"534\" data-permalink=\"https:\/\/www.jensd.de\/wordpress\/?attachment_id=534\" data-orig-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2013\/07\/raspi_touch2.pnp_.png\" data-orig-size=\"1148,42\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"raspi_touch2.pnp\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2013\/07\/raspi_touch2.pnp_-300x10.png\" data-large-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2013\/07\/raspi_touch2.pnp_-1024x37.png\" tabindex=\"0\" role=\"button\" src=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2013\/07\/raspi_touch2.pnp_.png\" alt=\"raspi_touch2.pnp\" width=\"1148\" height=\"42\" class=\"aligncenter size-full wp-image-534\" srcset=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2013\/07\/raspi_touch2.pnp_.png 1148w, https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2013\/07\/raspi_touch2.pnp_-300x10.png 300w, https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2013\/07\/raspi_touch2.pnp_-1024x37.png 1024w\" sizes=\"(max-width: 1148px) 100vw, 1148px\" \/><\/a><\/p>\n<p>So I guess this indicates that basically the device is recognized by the JVM. But TouchEvents are not handled the expected way.<br \/>\nAnyway this urged me to give it a try some more times with other settings, but then gave up without success.<\/p>\n<p>This morning <em>Gerrit Grunwald<\/em> told me, the next released build of Embedded JDK 8 will probably support &#8216;touch&#8217;, along with some other cool stuff like increased performance and media support (also WebView?).<br \/>\nLet&#8217;s hope the very best.<\/p>\n<p>Meanwhile I will have to continue with good old pointing device&#8230;<br \/>\n(in memory of Douglas C. Engelbart)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[UPDATE] Solved: eGalax Touch Screen issues with JavaFX (on Raspberry Pi) Hi all, yesterday I recevied my 7&#8243; touch screen. I immediately started to give it a try. In the end spend the night with getting it work with my RasPi. First with X11 Installed pre-configured kernel with eGalax touch screen support: Works! startx: Works!&hellip; <span class=\"clear\"><\/span><a href=\"https:\/\/www.jensd.de\/wordpress\/?p=516\" class=\"more-link read-more\" rel=\"bookmark\">Continue Reading <span class=\"screen-reader-text\">JavaFX 8 embedded currently &#8216;untouchable&#8217;?<\/span><i class=\"fa fa-arrow-right\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"footnotes":"","_jetpack_memberships_contains_paid_content":false,"jetpack_publicize_message":"#JavaFX 8 embedded currently 'untouchable'? http:\/\/wp.me\/p38FCL-8k","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[4,18,23],"tags":[76,86,89],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p38FCL-8k","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/516"}],"collection":[{"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=516"}],"version-history":[{"count":35,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/516\/revisions"}],"predecessor-version":[{"id":874,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/516\/revisions\/874"}],"wp:attachment":[{"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=516"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=516"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=516"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}