-
Bug
-
Resolution: Unresolved
-
P4
-
8u77, 9
-
x86
-
other
FULL PRODUCT VERSION :
java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Darwin JDev.local 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64
El Capitan 10.11.4
EXTRA RELEVANT SYSTEM CONFIGURATION :
Macbook Air 11" (Mid 2013), Macbook Air 13" (Mid 2013)
A DESCRIPTION OF THE PROBLEM :
Listening to Swipe Events on a JComponent is not working anymore.
When registering a SwipeListener using "GestureUtilities.addGestureListenerTo" and performing a gesture on the JComponent, the according methods are not being called altough a GesturePhaseListener notices the beginning and the end of those.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a JFrame with a JPanel or any JComponent,
Add a SwipeListener to GestureUtilities.addGestureListenerTo using the JComponent and a previously created (or anonymous) listener as parameters.
Execute swipe gestures on a compatible input device (trackpad) such as swiping with two fingers up, down, left and right.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Listener methods such as swipedDown, swipedUp should be called.
ACTUAL -
None of the methods to be implemented by the abstract class SwipeListener are being called, although an optional GesturePhaseListener registers beginning and end of the gestures.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
JPanel p = new JPanel();
JFrame f = new JFrame("Title here");
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setContentPane(p);
GestureUtilities.addGestureListenerTo(p, new SwipeListener() {
@Override
public void swipedDown(SwipeEvent e) {
System.out.println("Gesture Down");
}
@Override
public void swipedLeft(SwipeEvent e) {
System.out.println("Gesture Left");
}
@Override
public void swipedRight(SwipeEvent e) {
System.out.println("Gesture Right");
}
@Override
public void swipedUp(SwipeEvent e) {
System.out.println("Gesture Up");
}
});
GestureUtilities.addGestureListenerTo(p, new GesturePhaseListener() {
@Override
public void gestureBegan(GesturePhaseEvent e) {
System.out.println("=== Gesture begin ===");
}
@Override
public void gestureEnded(GesturePhaseEvent e) {
System.out.println("=== Gesture end ===");
}
});
f.setVisible(true);
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
No workaround yet, except for using third-party libraries.
java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Darwin JDev.local 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64
El Capitan 10.11.4
EXTRA RELEVANT SYSTEM CONFIGURATION :
Macbook Air 11" (Mid 2013), Macbook Air 13" (Mid 2013)
A DESCRIPTION OF THE PROBLEM :
Listening to Swipe Events on a JComponent is not working anymore.
When registering a SwipeListener using "GestureUtilities.addGestureListenerTo" and performing a gesture on the JComponent, the according methods are not being called altough a GesturePhaseListener notices the beginning and the end of those.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a JFrame with a JPanel or any JComponent,
Add a SwipeListener to GestureUtilities.addGestureListenerTo using the JComponent and a previously created (or anonymous) listener as parameters.
Execute swipe gestures on a compatible input device (trackpad) such as swiping with two fingers up, down, left and right.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Listener methods such as swipedDown, swipedUp should be called.
ACTUAL -
None of the methods to be implemented by the abstract class SwipeListener are being called, although an optional GesturePhaseListener registers beginning and end of the gestures.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
JPanel p = new JPanel();
JFrame f = new JFrame("Title here");
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setContentPane(p);
GestureUtilities.addGestureListenerTo(p, new SwipeListener() {
@Override
public void swipedDown(SwipeEvent e) {
System.out.println("Gesture Down");
}
@Override
public void swipedLeft(SwipeEvent e) {
System.out.println("Gesture Left");
}
@Override
public void swipedRight(SwipeEvent e) {
System.out.println("Gesture Right");
}
@Override
public void swipedUp(SwipeEvent e) {
System.out.println("Gesture Up");
}
});
GestureUtilities.addGestureListenerTo(p, new GesturePhaseListener() {
@Override
public void gestureBegan(GesturePhaseEvent e) {
System.out.println("=== Gesture begin ===");
}
@Override
public void gestureEnded(GesturePhaseEvent e) {
System.out.println("=== Gesture end ===");
}
});
f.setVisible(true);
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
No workaround yet, except for using third-party libraries.