JavaFX 8 embedded currently ‘untouchable’?

[UPDATE]
Solved: eGalax Touch Screen issues with JavaFX (on Raspberry Pi)

Hi all,

yesterday I recevied my 7″ 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!

raspi_touch1.pnp

startx: Works!

Now the really interesting part: JavaFX

For basic test purposes I added a TouchEventHandler to the root pane:

final EventHandler<TouchEvent> exitOnTouchEventHandler =
                new EventHandler<TouchEvent>() {
            @Override
            public void handle(TouchEvent t) {
                System.out.println(t.getTouchPoint().getScreenX());
                System.out.println(t.getTouchPoint().getScreenY());
                Platform.exit();
                t.consume();
            }
        };

        root.setOnTouchPressed(exitOnTouchEventHandler);
        root.setOnTouchReleased(exitOnTouchEventHandler);

Sadly: nothing happened

Then I pulled out the USB connection of the touch device and the app closed immediately with compliance of the event loop:

raspi_touch2.pnp

So I guess this indicates that basically the device is recognized by the JVM. But TouchEvents are not handled the expected way.
Anyway this urged me to give it a try some more times with other settings, but then gave up without success.

This morning Gerrit Grunwald told me, the next released build of Embedded JDK 8 will probably support ‘touch’, along with some other cool stuff like increased performance and media support (also WebView?).
Let’s hope the very best.

Meanwhile I will have to continue with good old pointing device…
(in memory of Douglas C. Engelbart)

Comments are closed.