X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Futil%2FPlatform.java;h=a5bee7c79f6b06e602e62a51e39b634db1651367;hb=6312cb6f6a715162cccd42b952c4801ee39715be;hp=e8558fa14739a0fced7f5360c43712746dfdfce4;hpb=9d2ac8fe3057585a37586379a3c1cd2ead49aafe;p=jalview.git diff --git a/src/jalview/util/Platform.java b/src/jalview/util/Platform.java index e8558fa..a5bee7c 100644 --- a/src/jalview/util/Platform.java +++ b/src/jalview/util/Platform.java @@ -29,11 +29,23 @@ import java.awt.event.MouseEvent; */ public class Platform { - private static Boolean isAMac = null, isWindows = null; + private static Boolean isAMac = null, isWindows = null, isLinux = null; private static Boolean isHeadless = null; /** + * added to check LaF for Linux + * + * @return + */ + public static boolean isLinux() + { + return (isLinux == null + ? (isLinux = (System.getProperty("os.name").indexOf("Linux") >= 0)) + : isLinux); + } + + /** * sorry folks - Macs really are different * * @return true if we do things in a special way. @@ -131,7 +143,8 @@ public class Platform { return false; } - return (jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx() // .getMenuShortcutKeyMaskEx() + return (jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx() // .getMenuShortcutKeyMaskEx() & jalview.util.ShortcutKeyMaskExWrapper .getModifiersEx(e)) != 0; // getModifiers()) != 0; } @@ -139,8 +152,8 @@ public class Platform } /** - * A (case sensitive) file path comparator that ignores the difference between / - * and \ + * A (case sensitive) file path comparator that ignores the difference between + * / and \ * * @param path1 * @param path2