--- a/jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java Thu Jan 24 15:26:40 2013 +0400
+++ b/jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java Thu Jan 24 15:52:25 2013 +0400
@@ -1226,7 +1226,7 @@
sendEventToDelegate(e);
}
- private void sendEventToDelegate(final AWTEvent e) {
+ protected void sendEventToDelegate(final AWTEvent e) {
synchronized (getDelegateLock()) {
if (getDelegate() == null || !isShowing() || !isEnabled()) {
return;
--- a/jdk/src/macosx/classes/sun/lwawt/LWScrollPanePeer.java Thu Jan 24 15:26:40 2013 +0400
+++ b/jdk/src/macosx/classes/sun/lwawt/LWScrollPanePeer.java Thu Jan 24 15:52:25 2013 +0400
@@ -29,6 +29,7 @@
import javax.swing.event.ChangeListener;
import javax.swing.event.ChangeEvent;
import java.awt.*;
+import java.awt.event.MouseWheelEvent;
import java.awt.peer.ScrollPanePeer;
import java.util.List;
@@ -52,6 +53,21 @@
}
@Override
+ public void handleEvent(AWTEvent e) {
+ if (e instanceof MouseWheelEvent) {
+ MouseWheelEvent wheelEvent = (MouseWheelEvent) e;
+ //java.awt.ScrollPane consumes the event
+ // in case isWheelScrollingEnabled() is true,
+ // forcibly send the consumed event to the delegate
+ if (getTarget().isWheelScrollingEnabled() && wheelEvent.isConsumed()) {
+ sendEventToDelegate(wheelEvent);
+ }
+ } else {
+ super.handleEvent(e);
+ }
+ }
+
+ @Override
public void stateChanged(final ChangeEvent e) {
SwingUtilities.invokeLater(new Runnable() {
@Override