Replaced getWheelRotation() with getRotation()

This commit is contained in:
codeanticode
2013-08-14 11:36:17 -04:00
parent a9d544823e
commit 79ac3d2869

View File

@@ -2699,10 +2699,13 @@ public class PGL {
}
}
@SuppressWarnings("deprecation")
int peCount = peAction == MouseEvent.WHEEL ?
(int) nativeEvent.getWheelRotation() :
nativeEvent.getClickCount();
int peCount = 0;
if (peAction == MouseEvent.WHEEL) {
peCount = nativeEvent.isShiftDown() ? (int)nativeEvent.getRotation()[0] :
(int)nativeEvent.getRotation()[1];
} else {
peCount = nativeEvent.getClickCount();
}
MouseEvent me = new MouseEvent(nativeEvent, nativeEvent.getWhen(),
peAction, peModifiers,