-
Bug
-
Resolution: Unresolved
-
P4
-
jfx11, 8
-
Odroid U3
java version "1.8.0_26-ea"
Java(TM) SE Runtime Environment (build 1.8.0_26-ea-b19)
Java HotSpot(TM) Client VM (build 25.26-b19, mixed mode)
GeChic touch screen
I've seen problems with touch during the J1 demo. So I added the following debug code:
private void debugTouch(Scene scene, Pane parent) {
scene.addEventFilter(TouchEvent.ANY, event -> {
parent.getChildren().removeAll(touchPoints);
for (int i = 0; i < event.getTouchPoints().size(); i++) {
TouchPoint tp = event.getTouchPoints().get(i);
Circle c;
if (touchPoints.size() > i) {
c = touchPoints.get(i);
} else {
c = new Circle(25, Color.rgb(255, 0, 0, 0.5));
c.setMouseTransparent(true);
touchPoints.add(c);
}
parent.getChildren().add(c);
Point2D p = parent.sceneToLocal(tp.getSceneX(), tp.getSceneY());
c.setLayoutX(p.getX());
c.setLayoutY(p.getY());
}
});
}
It visualizes each touch event by rendering circles where the touch points are reported.
I've seen the following issues with this code:
1. Consider you're touching the screen with two fingers, for example coordinates of one point is ~100,100 and second point is ~200,200. While still touching around the same points some events are reported with one or another point to be either 100,200 or 200,100.
2. Sometimes when you release fingers, wait half a second and do a next touch, you'll get previous touch points reported. So for example after two finger zoom touch, you press a button, but the event reports you all three touch points. See the screenshot.
private void debugTouch(Scene scene, Pane parent) {
scene.addEventFilter(TouchEvent.ANY, event -> {
parent.getChildren().removeAll(touchPoints);
for (int i = 0; i < event.getTouchPoints().size(); i++) {
TouchPoint tp = event.getTouchPoints().get(i);
Circle c;
if (touchPoints.size() > i) {
c = touchPoints.get(i);
} else {
c = new Circle(25, Color.rgb(255, 0, 0, 0.5));
c.setMouseTransparent(true);
touchPoints.add(c);
}
parent.getChildren().add(c);
Point2D p = parent.sceneToLocal(tp.getSceneX(), tp.getSceneY());
c.setLayoutX(p.getX());
c.setLayoutY(p.getY());
}
});
}
It visualizes each touch event by rendering circles where the touch points are reported.
I've seen the following issues with this code:
1. Consider you're touching the screen with two fingers, for example coordinates of one point is ~100,100 and second point is ~200,200. While still touching around the same points some events are reported with one or another point to be either 100,200 or 200,100.
2. Sometimes when you release fingers, wait half a second and do a next touch, you'll get previous touch points reported. So for example after two finger zoom touch, you press a button, but the event reports you all three touch points. See the screenshot.
- duplicates
-
JDK-8282702 Button is pressed one more time on Raspberry Pi with Touchscreen
-
- Closed
-
- relates to
-
JDK-8282104 Node zoom/rotate flickers on Raspberry Pi with Touchscreen
-
- In Progress
-
- links to
-
Review openjdk/jfx/641