01: /*
02: * $RCSfile: VAIBuilderEvent.java,v $
03: * @modification $Date: 2001/09/28 19:33:15 $
04: * @version $Id: VAIBuilderEvent.java,v 1.1 2001/09/28 19:33:15 hfalk Exp $
05: *
06: */
07:
08: package com.memoire.vainstall.builder.event;
09:
10: import java.util.EventObject;
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 {
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 userData;
42:
43: public VAIBuilderEvent(Object source) {
44: this (source, PROPERTIES_CHANGED);
45: }
46:
47: public VAIBuilderEvent(Object source, int type) {
48: super (source);
49: this .type = type;
50: }
51:
52: public VAIBuilderEvent(Object source, int type, String 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 getUserData() {
69: return userData;
70: }
71:
72: }
|