01: /*
02: * Gruntspud
03: *
04: * Copyright (C) 2002 Brett Smith.
05: *
06: * Written by: Brett Smith <t_magicthize@users.sourceforge.net>
07: *
08: * This program is free software; you can redistribute it and/or
09: * modify it under the terms of the GNU Library General Public License
10: * as published by the Free Software Foundation; either version 2 of
11: * the License, or (at your option) any later version.
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: * GNU Library General Public License for more details.
16: *
17: * You should have received a copy of the GNU Library General Public
18: * License along with this program; if not, write to the Free Software
19: * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20: */
21:
22: package gruntspud.file;
23:
24: import java.io.File;
25: import java.util.EventObject;
26:
27: /**
28: * Description of the Class
29: *
30: *@author magicthize
31: *@created 26 May 2002
32: */
33: public class FileChangeEvent extends EventObject {
34: public final static int FILE_ADDED = 0;
35: public final static int FILE_REMOVED = 1;
36: public final static int FILE_UPDATED = 2;
37:
38: //
39: private int type;
40: private File file;
41:
42: /**
43: * Creates a new FileChangeEvent object.
44: *
45: * @param source DOCUMENT ME!
46: * @param file DOCUMENT ME!
47: * @param type DOCUMENT ME!
48: */
49: public FileChangeEvent(Object source, File file, int type) {
50: super (source);
51: setFile(file);
52: setType(type);
53: }
54:
55: /**
56: * DOCUMENT ME!
57: *
58: * @param type DOCUMENT ME!
59: */
60: public void setType(int type) {
61: this .type = type;
62: }
63:
64: /**
65: * DOCUMENT ME!
66: *
67: * @param file DOCUMENT ME!
68: */
69: public void setFile(File file) {
70: this .file = file;
71: }
72:
73: /**
74: * DOCUMENT ME!
75: *
76: * @return DOCUMENT ME!
77: */
78: public int getType() {
79: return type;
80: }
81:
82: /**
83: * DOCUMENT ME!
84: *
85: * @return DOCUMENT ME!
86: */
87: public File getFile() {
88: return file;
89: }
90: }
|