KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > columba > mail > folder > event > FolderEvent


1 //The contents of this file are subject to the Mozilla Public License Version 1.1
2
//(the "License"); you may not use this file except in compliance with the
3
//License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
4
//
5
//Software distributed under the License is distributed on an "AS IS" basis,
6
//WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
7
//for the specific language governing rights and
8
//limitations under the License.
9
//
10
//The Original Code is "The Columba Project"
11
//
12
//The Initial Developers of the Original Code are Frederik Dietz and Timo Stich.
13
//Portions created by Frederik Dietz and Timo Stich are Copyright (C) 2003.
14
//
15
//All Rights Reserved.
16

17 package org.columba.mail.folder.event;
18
19 import java.util.EventObject JavaDoc;
20
21 import org.columba.mail.folder.IMailFolder;
22 import org.columba.ristretto.message.Flags;
23
24 /**
25  * Passed to listeners to notify them of changes.
26  */

27
28 public class FolderEvent extends EventObject JavaDoc implements IFolderEvent {
29     protected Object JavaDoc changes;
30     
31     protected int parameter;
32     protected Flags oldFlags;
33     
34     /**
35      * @param source
36      * @param changes
37      * @param parameter
38      */

39     public FolderEvent(Object JavaDoc source, Object JavaDoc changes, Flags oldFlags, int parameter) {
40         super(source);
41         this.changes = changes;
42         this.parameter = parameter;
43         this.oldFlags = oldFlags;
44     }
45     /**
46      * Creates a new event for the given folder.
47      */

48     public FolderEvent(IMailFolder source, Object JavaDoc changes) {
49         super(source);
50         this.changes = changes;
51     }
52     
53     /**
54      * @param folder
55      */

56     public FolderEvent(IMailFolder folder) {
57         super(folder);
58     }
59
60     /**
61      * Encapsulates the changes that have occured.
62      */

63     public Object JavaDoc getChanges() {
64         return changes;
65     }
66     /**
67      * @return Returns the parameter.
68      */

69     public int getParameter() {
70         return parameter;
71     }
72     /**
73      * @return Returns the oldFlags.
74      */

75     public Flags getOldFlags() {
76         return oldFlags;
77     }
78 }
79
Popular Tags