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

(-)a/openide.awt/apichanges.xml (+19 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="StatusTextImportance">
51
        <api name="awt"/>
52
        <summary>Allow messages to show in the main status line permanently.</summary>
53
        <version major="7" minor="5"/>
54
        <date day="6" month="1" year="2009"/>
55
        <author login="saubrecht"/>
56
        <compatibility addition="yes" binary="compatible" semantic="compatible" deprecation="no" deletion="no" modification="no"/>
57
        <description>
58
        Because of merging of editor's status line with main window's status line
59
        it is necessary to define the 'importance' of messages being displayed in the
60
        main status line. Messages with higher importance will replace messages
61
        with lower importance. These important messages will stay permanently visible
62
        until explicitly cleared or replaced (as opposed to current implementation
63
        when all status line messages are removed after some time) or when handle
64
        object associated with these messages get garbage-collected.
65
        </description>
66
        <class package="org.openide.awt" name="StatusDisplayer"/>
67
        <issue number="156357"/>
68
    </change>
50
    <change id="Actions.MenuText">
69
    <change id="Actions.MenuText">
51
        <api name="awt"/>
70
        <api name="awt"/>
52
        <summary>Actions can have "menuText" and "popupText" properties</summary>
71
        <summary>Actions can have "menuText" and "popupText" properties</summary>
(-)a/openide.awt/nbproject/project.properties (-1 / +1 lines)
Lines 46-49 Link Here
46
#javadoc.apichanges=${basedir}/api/apichanges.xml
46
#javadoc.apichanges=${basedir}/api/apichanges.xml
47
javadoc.apichanges=${basedir}/apichanges.xml
47
javadoc.apichanges=${basedir}/apichanges.xml
48
48
49
spec.version.base=7.4.0
49
spec.version.base=7.5.0
(-)a/openide.awt/src/org/openide/awt/StatusDisplayer.java (-1 / +59 lines)
Lines 51-56 Link Here
51
 * @since 3.14
51
 * @since 3.14
52
 */
52
 */
53
public abstract class StatusDisplayer {
53
public abstract class StatusDisplayer {
54
55
    /**
56
     * Default message 'importance' for file annotations.
57
     */
58
    public static final int IMPORTANCE_ANNOTATION = 1000;
59
    /**
60
     * Default message 'importance' for messages from incremental find.
61
     */
62
    public static final int IMPORTANCE_INCREMENTAL_FIND = 900;
63
    /**
64
     * Default message 'importance' for messages from find and replace actions.
65
     */
66
    public static final int IMPORTANCE_FIND_OR_REPLACE = 800;
67
    /**
68
     * Default message 'importance' for error and warning messages on current line.
69
     */
70
    public static final int IMPORTANCE_ERROR_HIGHLIGHT = 700;
71
54
    private static StatusDisplayer INSTANCE = null;
72
    private static StatusDisplayer INSTANCE = null;
55
73
56
    /** Subclass constructor. */
74
    /** Subclass constructor. */
Lines 89-98 Link Here
89
     *  <p class="nonnormative">Default implementation of status line in NetBeans
107
     *  <p class="nonnormative">Default implementation of status line in NetBeans
90
     * displays the text in status line and clears it after a while. 
108
     * displays the text in status line and clears it after a while. 
91
     * Also there is no guarantee how long the text will be displayed as 
109
     * Also there is no guarantee how long the text will be displayed as 
92
     * it can be replaced with new call to this method at any time.
110
     * it can be replaced with new call to this method at any time.</p>
111
     * <p>Note: The text may not show in the status line at all if some
112
     * other text with higher importance is currently showing in the status line.</p>
93
     * @param text the text to be shown
113
     * @param text the text to be shown
114
     * @see #setStatusText(String,int)
94
     */
115
     */
95
    public abstract void setStatusText(String text);
116
    public abstract void setStatusText(String text);
117
118
    /**
119
     * <p>Show text in the status line. <code>importance</code> argument
120
     * indicates that the text should stay in the status line until it is replaced
121
     * with new text by calling <code>setStatusText(String,int)</code> again with
122
     * the same or higher importance value.</p>
123
     * <p>The text will be removed from status line when this method's return value is
124
     * garbage-collected or excplicitly by calling <code>Message.clear(int)</code>.
125
     * @param text The text to be shown until some other text with the same or higher
126
     * importance is passed into the status line.
127
     * @param importance Positive integer defining the 'Importance' of the message
128
     * to be displayed, the higher number the higher importance.
129
     * @return Handle associated with given status line text. The text will be removed
130
     * from status line either after calling <code>clear(int)</code> on this handle or when
131
     * the <code>Message</code> object is garbage-collected.
132
     * @throws IllegalArgumentException If importance <= 0
133
     */
134
    public Message setStatusText(String text, int importance) {
135
        setStatusText(text);
136
        return new Message();
137
    }
96
138
97
    /** Add a listener for when the text changes.
139
    /** Add a listener for when the text changes.
98
     * @param l a listener
140
     * @param l a listener
Lines 103-108 Link Here
103
     * @param l a listener
145
     * @param l a listener
104
     */
146
     */
105
    public abstract void removeChangeListener(ChangeListener l);
147
    public abstract void removeChangeListener(ChangeListener l);
148
149
    /**
150
     * Handle for 'important' status line messages. The message will be removed
151
     * from status line when this object is garbage-collected.
152
     *
153
     * @see #setStatusText(String,int)
154
     */
155
    public static class Message {
156
        /**
157
         * Removes this message from status line after <code>timeInMillis</code>
158
         * milliseconds.
159
         * @param timeInMillis
160
         */
161
        public void clear(int timeInMillis) {
162
        }
163
    }
106
164
107
    /**
165
    /**
108
     * Trivial default impl for standalone usage.
166
     * Trivial default impl for standalone usage.

Return to bug 156357