This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 61044
Collapse All | Expand All

(-)openide/util/apichanges.xml (+17 lines)
Lines 27-32 Link Here
27
</apidefs>
27
</apidefs>
28
<changes>
28
<changes>
29
29
30
    <change id="Utilities.isMac">
31
        <api name="util"/>
32
        <summary>Added <code>Utilities.isMac()</code> method</summary>
33
        <version major="7" minor="7"/>
34
        <date day="11" month="1" year="2007"/>
35
        <author login="rkubacki"/>
36
        <compatibility addition="yes"/>
37
        <description>
38
            <p>
39
                Added a <code>Utilities.isMac()</code> method for checking 
40
                if current platform is Mac.
41
            </p>
42
        </description>
43
        <class package="org.openide.util" name="Utilities"/>
44
        <issue number="61044"/>
45
    </change>
46
30
    <change id="Parameters">
47
    <change id="Parameters">
31
        <api name="util"/>
48
        <api name="util"/>
32
        <summary>Added <code>Parameters</code></summary>
49
        <summary>Added <code>Parameters</code></summary>
(-)openide/util/nbproject/project.properties (-1 / +1 lines)
Lines 19-25 Link Here
19
javac.source=1.5
19
javac.source=1.5
20
module.jar.dir=lib
20
module.jar.dir=lib
21
21
22
spec.version.base=7.6.0
22
spec.version.base=7.7.0
23
23
24
# For XMLSerializer, needed for XMLUtil.write to work w/ namespaces under JDK 1.4:
24
# For XMLSerializer, needed for XMLUtil.write to work w/ namespaces under JDK 1.4:
25
25
(-)openide/util/src/org/openide/util/Utilities.java (-4 / +12 lines)
Lines 325-330 Link Here
325
        return (getOperatingSystem() & OS_WINDOWS_MASK) != 0;
325
        return (getOperatingSystem() & OS_WINDOWS_MASK) != 0;
326
    }
326
    }
327
327
328
    /** Test whether NetBeans is running on MacOS.
329
     * @since 7.7
330
    * @return <code>true</code> if Mac, <code>false</code> if some other manner of operating system
331
    */
332
    public static final boolean isMac() {
333
        return (getOperatingSystem() & OS_MAC) != 0;
334
    }
335
328
    /** Test whether NetBeans is running on some variant of Unix.
336
    /** Test whether NetBeans is running on some variant of Unix.
329
    * Linux is included as well as the commercial vendors.
337
    * Linux is included as well as the commercial vendors.
330
    * @return <code>true</code> some sort of Unix, <code>false</code> if some other manner of operating system
338
    * @return <code>true</code> some sort of Unix, <code>false</code> if some other manner of operating system
Lines 1701-1707 Link Here
1701
                        if (wildcard) {
1709
                        if (wildcard) {
1702
                            needed |= Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
1710
                            needed |= Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
1703
1711
1704
                            if ((getOperatingSystem() & OS_MAC) != 0) {
1712
                            if (isMac()) {
1705
                                if (!usableKeyOnMac(i.intValue(), needed)) {
1713
                                if (!usableKeyOnMac(i.intValue(), needed)) {
1706
                                    needed &= ~Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
1714
                                    needed &= ~Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
1707
                                    needed |= KeyEvent.CTRL_MASK;
1715
                                    needed |= KeyEvent.CTRL_MASK;
Lines 1994-2000 Link Here
1994
    }
2002
    }
1995
2003
1996
    /** @return size of the screen. The size is modified for Windows OS
2004
    /** @return size of the screen. The size is modified for Windows OS
1997
     * - some pointes are subtracted to reflect a presence of the taskbar
2005
     * - some points are subtracted to reflect a presence of the taskbar
1998
     *
2006
     *
1999
     * @deprecated this method is almost useless in multiple monitor configuration
2007
     * @deprecated this method is almost useless in multiple monitor configuration
2000
     *
2008
     *
Lines 2007-2013 Link Here
2007
2015
2008
        if (isWindows() && !Boolean.getBoolean("netbeans.no.taskbar")) {
2016
        if (isWindows() && !Boolean.getBoolean("netbeans.no.taskbar")) {
2009
            screenSize.height -= TYPICAL_WINDOWS_TASKBAR_HEIGHT;
2017
            screenSize.height -= TYPICAL_WINDOWS_TASKBAR_HEIGHT;
2010
        } else if ((getOperatingSystem() & OS_MAC) != 0) {
2018
        } else if (isMac()) {
2011
            screenSize.height -= TYPICAL_MACOSX_MENU_HEIGHT;
2019
            screenSize.height -= TYPICAL_MACOSX_MENU_HEIGHT;
2012
        }
2020
        }
2013
2021
Lines 2803-2809 Link Here
2803
        Image image = null;
2811
        Image image = null;
2804
2812
2805
        // First check for Mac because its part of the Unix_Mask
2813
        // First check for Mac because its part of the Unix_Mask
2806
        if (getOperatingSystem() == OS_MAC) {
2814
        if (isMac()) {
2807
            image = loadImage("org/openide/util/progress-cursor-mac.gif"); //NOI18N
2815
            image = loadImage("org/openide/util/progress-cursor-mac.gif"); //NOI18N
2808
        } else if (isUnix()) {
2816
        } else if (isUnix()) {
2809
            image = loadImage("org/openide/util/progress-cursor-motif.gif"); //NOI18N
2817
            image = loadImage("org/openide/util/progress-cursor-motif.gif"); //NOI18N

Return to bug 61044