Index: openide/util/apichanges.xml =================================================================== RCS file: /shared/data/ccvs/repository/openide/util/apichanges.xml,v retrieving revision 1.21 diff -u -r1.21 apichanges.xml --- openide/util/apichanges.xml 8 Dec 2006 14:38:16 -0000 1.21 +++ openide/util/apichanges.xml 4 Jan 2007 07:40:26 -0000 @@ -27,6 +27,23 @@ + + + Added Utilities.isMac() method + + + + + +

+ Added a Utilities.isMac() method for checking + if current platform is Mac. +

+
+ + +
+ Added Parameters Index: openide/util/nbproject/project.properties =================================================================== RCS file: /shared/data/ccvs/repository/openide/util/nbproject/project.properties,v retrieving revision 1.24 diff -u -r1.24 project.properties --- openide/util/nbproject/project.properties 8 Dec 2006 14:38:16 -0000 1.24 +++ openide/util/nbproject/project.properties 4 Jan 2007 07:40:26 -0000 @@ -19,7 +19,7 @@ javac.source=1.5 module.jar.dir=lib -spec.version.base=7.6.0 +spec.version.base=7.7.0 # For XMLSerializer, needed for XMLUtil.write to work w/ namespaces under JDK 1.4: Index: openide/util/src/org/openide/util/Utilities.java =================================================================== RCS file: /shared/data/ccvs/repository/openide/util/src/org/openide/util/Utilities.java,v retrieving revision 1.23 diff -u -r1.23 Utilities.java --- openide/util/src/org/openide/util/Utilities.java 5 Oct 2006 23:43:28 -0000 1.23 +++ openide/util/src/org/openide/util/Utilities.java 4 Jan 2007 07:40:27 -0000 @@ -325,6 +325,14 @@ return (getOperatingSystem() & OS_WINDOWS_MASK) != 0; } + /** Test whether NetBeans is running on MacOS. + * @since 7.7 + * @return true if Mac, false if some other manner of operating system + */ + public static final boolean isMac() { + return (getOperatingSystem() & OS_MAC) != 0; + } + /** Test whether NetBeans is running on some variant of Unix. * Linux is included as well as the commercial vendors. * @return true some sort of Unix, false if some other manner of operating system @@ -1701,7 +1709,7 @@ if (wildcard) { needed |= Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); - if ((getOperatingSystem() & OS_MAC) != 0) { + if (isMac()) { if (!usableKeyOnMac(i.intValue(), needed)) { needed &= ~Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); needed |= KeyEvent.CTRL_MASK; @@ -1994,7 +2002,7 @@ } /** @return size of the screen. The size is modified for Windows OS - * - some pointes are subtracted to reflect a presence of the taskbar + * - some points are subtracted to reflect a presence of the taskbar * * @deprecated this method is almost useless in multiple monitor configuration * @@ -2007,7 +2015,7 @@ if (isWindows() && !Boolean.getBoolean("netbeans.no.taskbar")) { screenSize.height -= TYPICAL_WINDOWS_TASKBAR_HEIGHT; - } else if ((getOperatingSystem() & OS_MAC) != 0) { + } else if (isMac()) { screenSize.height -= TYPICAL_MACOSX_MENU_HEIGHT; } @@ -2803,7 +2811,7 @@ Image image = null; // First check for Mac because its part of the Unix_Mask - if (getOperatingSystem() == OS_MAC) { + if (isMac()) { image = loadImage("org/openide/util/progress-cursor-mac.gif"); //NOI18N } else if (isUnix()) { image = loadImage("org/openide/util/progress-cursor-motif.gif"); //NOI18N