From 3afd663660a818f0029e3081442a7d76793b6dc6 Mon Sep 17 00:00:00 2001 From: rod Date: Fri, 30 Jan 2004 07:42:34 +0000 Subject: [PATCH] 2003/12/03 16:07:05 darcs-hash:20040130074234-42696-0f646c1529f7f82049c48e83a5a939e5fbc95858.gz --- src/org/xwt/plat/Java2.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/org/xwt/plat/Java2.java b/src/org/xwt/plat/Java2.java index f478b58..10b003f 100644 --- a/src/org/xwt/plat/Java2.java +++ b/src/org/xwt/plat/Java2.java @@ -117,7 +117,7 @@ public class Java2 extends AWT { new Point(1, 1), "invisible"); protected static class Java2Surface extends AWTSurface { - + public Java2Surface(Box root, boolean framed) { super(root, framed); } protected void _setMinimized(boolean b) { @@ -132,12 +132,13 @@ public class Java2 extends AWT { } } - protected static class Java14Surface extends Java2Surface implements WindowStateListener { + protected static class Java14Surface extends Java2Surface implements WindowStateListener, MouseWheelListener { public Java14Surface(Box root, boolean framed) { super(root, true); // JDK1.4 doesn't like java.lang.Window's... if (!framed) ((Frame)window).setUndecorated(true); window.addWindowStateListener(this); + window.addMouseWheelListener(this); window.setVisible(true); } @@ -164,6 +165,11 @@ public class Java2 extends AWT { Maximized(false); } } + + public void mouseWheelMoved(MouseWheelEvent m) { + // TODO: Uncomment this once Scroll is implemented in the core + //if(m.getScrollType() == MouseWheelEvent.WHEEL_UNIT_SCROLL) { Scroll(m.getUnitsToScroll()); } + } } protected static class Java2PixelBuffer extends AWTPixelBuffer { -- 1.7.10.4