2003/12/03 16:07:05
authorrod <rod@xwt.org>
Fri, 30 Jan 2004 07:42:34 +0000 (07:42 +0000)
committerrod <rod@xwt.org>
Fri, 30 Jan 2004 07:42:34 +0000 (07:42 +0000)
darcs-hash:20040130074234-42696-0f646c1529f7f82049c48e83a5a939e5fbc95858.gz

src/org/xwt/plat/Java2.java

index f478b58..10b003f 100644 (file)
@@ -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 {