KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > memoire > vainstall > builder > event > VAIBuilderEvent


1 /*
2  * $RCSfile: VAIBuilderEvent.java,v $
3  * @modification $Date: 2001/09/28 19:33:15 $
4  * @version $Id: VAIBuilderEvent.java,v 1.1 2001/09/28 19:33:15 hfalk Exp $
5  *
6  */

7
8 package com.memoire.vainstall.builder.event;
9
10 import java.util.EventObject JavaDoc;
11
12 /**
13  * This event is generated by the VAIBuilderModel and 'signals' changes
14  * in the data model
15  *
16  * @see com.memoire.vainstall.builder.VAIBuilderModel
17  * @see java.util.EventObject
18  *
19  * @author Henrik Falk
20  * @version $Id: VAIBuilderEvent.java,v 1.1 2001/09/28 19:33:15 hfalk Exp $
21  */

22 public class VAIBuilderEvent extends EventObject JavaDoc {
23
24     public static final int PREFERENCES_LOADED = 1;
25     public static final int PREFERENCES_SAVED = 2;
26
27     public static final int LASTFILELIST_CHANGED = 3;
28     public static final int PROPERTIES_CHANGED = 4;
29
30     public static final int PROJECT_ACTIVATED = 5;
31     public static final int PROJECT_DEACTIVATED = 6;
32
33     /**
34      * The type of event
35      */

36     protected int type;
37
38     /**
39      * User data provided by this event
40      */

41     protected String JavaDoc userData;
42
43     public VAIBuilderEvent(Object JavaDoc source) {
44         this(source,PROPERTIES_CHANGED);
45     }
46
47     public VAIBuilderEvent(Object JavaDoc source, int type) {
48         super(source);
49         this.type = type;
50     }
51
52     public VAIBuilderEvent(Object JavaDoc source, int type, String JavaDoc userData) {
53         super(source);
54         this.type = type;
55         this.userData = userData;
56     }
57
58     /**
59      * Returns the type of event
60      */

61     public int getType() {
62         return type;
63     }
64
65     /**
66      * Returns the user data of the event
67      */

68     public String JavaDoc getUserData() {
69         return userData;
70     }
71
72 }
73
Popular Tags