isAMac() -> isAMacAndNotJS(), isWindows() -> isWindowsAndNotJS()
authorhansonr <hansonr@STO24954W.ad.stolaf.edu>
Mon, 21 Jan 2019 17:39:57 +0000 (11:39 -0600)
committerhansonr <hansonr@STO24954W.ad.stolaf.edu>
Mon, 21 Jan 2019 17:39:57 +0000 (11:39 -0600)
Added Platform.isWin[Right|Middle]Button()

src/jalview/util/Platform.java

index bb3f7fa..6c32ad4 100644 (file)
@@ -191,8 +191,8 @@ public class Platform
        return !isAMacAndNotJS() && SwingUtilities.isRightMouseButton(e);
   }
 
-  public static boolean isWinMiddleButton(MouseEvent evt) 
+  public static boolean isWinMiddleButton(MouseEvent e) 
   {
-       return !isAMacAndNotJS() && ((evt.getModifiers() & InputEvent.BUTTON2_MASK) == InputEvent.BUTTON2_MASK);
+       return !isAMacAndNotJS() && SwingUtilities.isMiddleMouseButton(e);
   }
 }