KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > lib > cvsclient > event > EnhancedMessageEvent


1 /*****************************************************************************
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14
15  * The Original Software is the CVS Client Library.
16  * The Initial Developer of the Original Software is Robert Greig.
17  * Portions created by Robert Greig are Copyright (C) 2000.
18  * All Rights Reserved.
19
20  * Contributor(s): Robert Greig.
21  *****************************************************************************/

22 package org.netbeans.lib.cvsclient.event;
23
24 /**
25  * An event sent from the server to indicate that a message should be
26  * displayed to the user
27  * @author Milos Kleint
28  */

29 public class EnhancedMessageEvent extends MessageEvent {
30
31     /**
32      * Sent by MergedResponse when 2 files were merged.
33      * The value is a String instance that tells the full path to the file.
34      */

35     public static final String JavaDoc MERGED_PATH = "Merged_Response_File_Path"; // NOI18N
36

37     /**
38      * Sent when a file was successfully sent to server.
39      */

40     public static final String JavaDoc FILE_SENDING = "File_Sent_To_Server"; // NOI18N
41

42     /**
43      * Sent when a all requests were sent to server.
44      * Value is a String with value of "ok".
45      */

46     public static final String JavaDoc REQUESTS_SENT = "All_Requests_Were_Sent"; // NOI18N
47

48     /**
49      * Sent before all request are processed.
50      * Value is an Integer object.
51      */

52     public static final String JavaDoc REQUESTS_COUNT = "Requests_Count"; // NOI18N
53

54     private String JavaDoc key;
55     private Object JavaDoc value;
56
57     /**
58      * Construct a MessageEvent
59      * @param source the source of the event
60      * @param key identifier. Specifies what the value object is.
61      * @param value. Some value passed to the listeners. The key parameter helps
62      * the listeners to identify the value and handle it correctly.
63      * for stderr rather than stdout), false otherwise
64      */

65
66     public EnhancedMessageEvent(Object JavaDoc source, String JavaDoc key, Object JavaDoc value) {
67         super(source, "", false); // NOI18N
68
this.key = key;
69         this.value = value;
70     }
71
72     /** Getter for property key.
73      * @return Value of property key.
74      */

75     public String JavaDoc getKey() {
76         return key;
77     }
78
79     /** Setter for property key.
80      * @param key New value of property key.
81      */

82     public void setKey(String JavaDoc key) {
83         this.key = key;
84     }
85
86     /** Getter for property value.
87      * @return Value of property value.
88      */

89     public Object JavaDoc getValue() {
90         return value;
91     }
92
93     /** Setter for property value.
94      * @param value New value of property value.
95      */

96     public void setValue(Object JavaDoc value) {
97         this.value = value;
98     }
99 }
100
Popular Tags