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 174183
Collapse All | Expand All

(-)a/core.ui/nbproject/project.xml (-2 / +11 lines)
Lines 43-49 Link Here
43
<project xmlns="http://www.netbeans.org/ns/project/1">
43
<project xmlns="http://www.netbeans.org/ns/project/1">
44
    <type>org.netbeans.modules.apisupport.project</type>
44
    <type>org.netbeans.modules.apisupport.project</type>
45
    <configuration>
45
    <configuration>
46
        <data xmlns="http://www.netbeans.org/ns/nb-module-project/2">
46
        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
47
            <code-name-base>org.netbeans.core.ui</code-name-base>
47
            <code-name-base>org.netbeans.core.ui</code-name-base>
48
            <module-dependencies>
48
            <module-dependencies>
49
                <dependency>
49
                <dependency>
Lines 94-100 Link Here
94
                    <build-prerequisite/>
94
                    <build-prerequisite/>
95
                    <compile-dependency/>
95
                    <compile-dependency/>
96
                    <run-dependency>
96
                    <run-dependency>
97
                        <specification-version>7.12</specification-version>
97
                        <specification-version>7.17</specification-version>
98
                    </run-dependency>
98
                    </run-dependency>
99
                </dependency>
99
                </dependency>
100
                <dependency>
100
                <dependency>
Lines 154-159 Link Here
154
                    </run-dependency>
154
                    </run-dependency>
155
                </dependency>
155
                </dependency>
156
            </module-dependencies>
156
            </module-dependencies>
157
            <test-dependencies>
158
                <test-type>
159
                    <name>unit</name>
160
                    <test-dependency>
161
                        <code-name-base>org.netbeans.libs.junit4</code-name-base>
162
                        <compile-dependency/>
163
                    </test-dependency>
164
                </test-type>
165
            </test-dependencies>
157
            <public-packages/>
166
            <public-packages/>
158
        </data>
167
        </data>
159
    </configuration>
168
    </configuration>
(-)a/core.ui/src/org/netbeans/core/ui/notifications/FlashingIcon.java (-1 / +3 lines)
Lines 57-62 Link Here
57
import javax.swing.JLabel;
57
import javax.swing.JLabel;
58
import javax.swing.JToolTip;
58
import javax.swing.JToolTip;
59
import javax.swing.SwingUtilities;
59
import javax.swing.SwingUtilities;
60
import org.openide.awt.NotificationDisplayer.Priority;
60
import org.openide.util.RequestProcessor;
61
import org.openide.util.RequestProcessor;
61
import org.openide.util.RequestProcessor.Task;
62
import org.openide.util.RequestProcessor.Task;
62
63
Lines 250-256 Link Here
250
251
251
    public void propertyChange(PropertyChangeEvent evt) {
252
    public void propertyChange(PropertyChangeEvent evt) {
252
        if( NotificationDisplayerImpl.PROP_NOTIFICATION_ADDED.equals(evt.getPropertyName()) ) {
253
        if( NotificationDisplayerImpl.PROP_NOTIFICATION_ADDED.equals(evt.getPropertyName()) ) {
253
            setNotification( (NotificationImpl)evt.getNewValue(), true );
254
            final NotificationImpl ni = (NotificationImpl) evt.getNewValue();
255
            setNotification( ni, ni.showBallon() );
254
            PopupList.dismiss();
256
            PopupList.dismiss();
255
        } else if( NotificationDisplayerImpl.PROP_NOTIFICATION_REMOVED.equals(evt.getPropertyName()) ) {
257
        } else if( NotificationDisplayerImpl.PROP_NOTIFICATION_REMOVED.equals(evt.getPropertyName()) ) {
256
            NotificationImpl removed = (NotificationImpl)evt.getNewValue();
258
            NotificationImpl removed = (NotificationImpl)evt.getNewValue();
(-)a/core.ui/src/org/netbeans/core/ui/notifications/NotificationImpl.java (+4 lines)
Lines 92-95 Link Here
92
    public String getTitle() {
92
    public String getTitle() {
93
        return title;
93
        return title;
94
    }
94
    }
95
96
    boolean showBallon() {
97
        return priority != Priority.SILENT;
98
    }
95
}
99
}
(-)cba4b1a0a484 (+61 lines)
Added Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
5
 *
6
 * The contents of this file are subject to the terms of either the GNU
7
 * General Public License Version 2 only ("GPL") or the Common
8
 * Development and Distribution License("CDDL") (collectively, the
9
 * "License"). You may not use this file except in compliance with the
10
 * License. You can obtain a copy of the License at
11
 * http://www.netbeans.org/cddl-gplv2.html
12
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
13
 * specific language governing permissions and limitations under the
14
 * License.  When distributing the software, include this License Header
15
 * Notice in each file and include the License file at
16
 * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
17
 * particular file as subject to the "Classpath" exception as provided
18
 * by Sun in the GPL Version 2 section of the License file that
19
 * accompanied this code. If applicable, add the following below the
20
 * License Header, with the fields enclosed by brackets [] replaced by
21
 * your own identifying information:
22
 * "Portions Copyrighted [year] [name of copyright owner]"
23
 *
24
 * If you wish your version of this file to be governed by only the CDDL
25
 * or only the GPL Version 2, indicate your decision by adding
26
 * "[Contributor] elects to include this software in this distribution
27
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
28
 * single choice of license, a recipient has the option to distribute
29
 * your version of this file under either the CDDL, the GPL Version 2 or
30
 * to extend the choice of license to its licensees as provided above.
31
 * However, if you add GPL Version 2 code and therefore, elected the GPL
32
 * Version 2 license, then the option applies only if the new code is
33
 * made subject to such option by the copyright holder.
34
 *
35
 * Contributor(s):
36
 *
37
 * Portions Copyrighted 2009 Sun Microsystems, Inc.
38
 */
39
40
package org.netbeans.core.ui.notifications;
41
42
import junit.framework.TestCase;
43
import org.openide.awt.NotificationDisplayer.Priority;
44
45
/**
46
 *
47
 * @author Jaroslav Tulach <jtulach@netbeans.org>
48
 */
49
public class NotificationImplTest extends TestCase {
50
    
51
    public NotificationImplTest(String testName) {
52
        super(testName);
53
    }
54
55
    public void testSilentMeansNoBalloon() {
56
        NotificationImpl instance = new NotificationImpl();
57
        instance.init("Title", null, Priority.SILENT, null, null);
58
        assertFalse("No balloon", instance.showBallon());
59
    }
60
61
}
(-)a/nbbuild/hudson/core-main (+1 lines)
Lines 26-31 Link Here
26
    testmodule core.multiview
26
    testmodule core.multiview
27
    testmodule core.output2
27
    testmodule core.output2
28
    testmodule core.startup
28
    testmodule core.startup
29
    testmodule core.ui
29
    testmodule core.windows
30
    testmodule core.windows
30
    testmodule editor.mimelookup
31
    testmodule editor.mimelookup
31
    testmodule editor.mimelookup.impl
32
    testmodule editor.mimelookup.impl
(-)a/openide.awt/apichanges.xml (+14 lines)
Lines 47-52 Link Here
47
<apidef name="awt">AWT API</apidef>
47
<apidef name="awt">AWT API</apidef>
48
</apidefs>
48
</apidefs>
49
<changes>
49
<changes>
50
    <change id="Notification.SILENT">
51
        <api name="awt"/>
52
        <summary>Support for silent notifications</summary>
53
        <version major="7" minor="17"/>
54
        <date day="16" month="10" year="2009"/>
55
        <author login="jtulach"/>
56
        <compatibility addition="yes" binary="compatible" semantic="compatible" deprecation="no" deletion="no" modification="no"/>
57
        <description>
58
            New priority to show a notification but without its details initially.
59
            The user can display the details baloon manually later.
60
        </description>
61
        <class package="org.openide.awt" name="NotificationDisplayer"/>
62
        <issue number="174183"/>
63
    </change>
50
    <change id="AlwaysEnabledAction.CheckBox">
64
    <change id="AlwaysEnabledAction.CheckBox">
51
        <api name="awt"/>
65
        <api name="awt"/>
52
        <summary>AwlaysEnabledAction can represent a boolean key in Preferences.</summary>
66
        <summary>AwlaysEnabledAction can represent a boolean key in Preferences.</summary>
(-)a/openide.awt/nbproject/project.properties (-1 / +1 lines)
Lines 44-47 Link Here
44
javadoc.arch=${basedir}/arch.xml
44
javadoc.arch=${basedir}/arch.xml
45
javadoc.apichanges=${basedir}/apichanges.xml
45
javadoc.apichanges=${basedir}/apichanges.xml
46
46
47
spec.version.base=7.16.0
47
spec.version.base=7.17.0
(-)a/openide.awt/src/org/openide/awt/NotificationDisplayer.java (+6 lines)
Lines 61-66 Link Here
61
        HIGH,
61
        HIGH,
62
        NORMAL,
62
        NORMAL,
63
        LOW,
63
        LOW,
64
        /** Priority that shows the notification without details.
65
         * Details shall be shown only later, per user request.
66
         * @since 7.17
67
         */
68
        SILENT
64
    }
69
    }
65
70
66
    /**
71
    /**
Lines 149-154 Link Here
149
                    importance = 50;
154
                    importance = 50;
150
                    break;
155
                    break;
151
                case LOW:
156
                case LOW:
157
                case SILENT:
152
                    importance = 1;
158
                    importance = 1;
153
                    break;
159
                    break;
154
            }
160
            }
(-)a/uihandler/nbproject/project.xml (-1 / +1 lines)
Lines 86-92 Link Here
86
                    <build-prerequisite/>
86
                    <build-prerequisite/>
87
                    <compile-dependency/>
87
                    <compile-dependency/>
88
                    <run-dependency>
88
                    <run-dependency>
89
                        <specification-version>6.7</specification-version>
89
                        <specification-version>7.17</specification-version>
90
                    </run-dependency>
90
                    </run-dependency>
91
                </dependency>
91
                </dependency>
92
                <dependency>
92
                <dependency>
(-)a/uihandler/src/org/netbeans/modules/uihandler/SlownessReporter.java (-1 / +5 lines)
Lines 58-63 Link Here
58
import javax.swing.JPanel;
58
import javax.swing.JPanel;
59
import org.openide.awt.Notification;
59
import org.openide.awt.Notification;
60
import org.openide.awt.NotificationDisplayer;
60
import org.openide.awt.NotificationDisplayer;
61
import org.openide.awt.NotificationDisplayer.Priority;
61
import org.openide.util.ImageUtilities;
62
import org.openide.util.ImageUtilities;
62
import org.openide.util.NbBundle;
63
import org.openide.util.NbBundle;
63
64
Lines 148-158 Link Here
148
149
149
        NotifySnapshot(SlownessData data) {
150
        NotifySnapshot(SlownessData data) {
150
            this.data = data;
151
            this.data = data;
152
            NotificationDisplayer.Priority priority = Priority.SILENT;
153
            // in dev builds use higher priority
154
            assert (priority = Priority.LOW) != null;
151
            note = NotificationDisplayer.getDefault().notify(
155
            note = NotificationDisplayer.getDefault().notify(
152
                    NbBundle.getMessage(NotifySnapshot.class, "TEQ_LowPerformance"),
156
                    NbBundle.getMessage(NotifySnapshot.class, "TEQ_LowPerformance"),
153
                    ImageUtilities.loadImageIcon("org/netbeans/modules/uihandler/vilik.png", true),
157
                    ImageUtilities.loadImageIcon("org/netbeans/modules/uihandler/vilik.png", true),
154
                    createPanel(), createPanel(),
158
                    createPanel(), createPanel(),
155
                    NotificationDisplayer.Priority.LOW);
159
                    priority);
156
            if (CLEAR > 0) {
160
            if (CLEAR > 0) {
157
                Installer.RP.post(new Runnable() {
161
                Installer.RP.post(new Runnable() {
158
162

Return to bug 174183