mousewheel support on all platforms (X11,Darwin,Win32,Java14) and in the core (bug...
[org.ibex.core.git] / src / org / ibex / plat / Java2.java
index f63317e..0263a5b 100644 (file)
@@ -20,7 +20,7 @@ public class Java2 extends AWT {
         // disable the focus manager so we can intercept the tab key
         String versionString = System.getProperty("java.version", "");
         int secondDecimal = versionString.substring(versionString.indexOf('.') + 1).indexOf('.');
-        if (secondDecimal != -1) versionString = versionString.substring(0, secondDecimal);
+        if (secondDecimal != -1) versionString = versionString.substring(0, versionString.indexOf('.') + 1 + secondDecimal);
         double version = Double.parseDouble(versionString);
         if (version >= 1.4) {
             isJava14 = true;
@@ -159,8 +159,8 @@ public class Java2 extends AWT {
         }
 
         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()); }
+            if (m.getScrollType() == MouseWheelEvent.WHEEL_UNIT_SCROLL)
+                VScroll(m.getUnitsToScroll());
         }
     }