01: /* uDig - User Friendly Desktop Internet GIS client
02: * http://udig.refractions.net
03: * (C) 2004, Refractions Research Inc.
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation;
08: * version 2.1 of the License.
09: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: */
15: package net.refractions.udig.project;
16:
17: /**
18: * A superclass for udig model events.
19: * @author Jesse
20: * @since 1.1.0
21: */
22: public abstract class UDIGEvent {
23:
24: final protected Object source;
25: final protected Object oldValue;
26: final protected Object newValue;
27:
28: protected UDIGEvent(Object source2, Object newValue2,
29: Object oldValue2) {
30: this .source = source2;
31: this .newValue = newValue2;
32: this .oldValue = oldValue2;
33: }
34:
35: /**
36: * Gets the new value, if it applies.
37: *
38: * @return The new value, if it applies.
39: */
40: public Object getNewValue() {
41: return newValue;
42: }
43:
44: /**
45: * Gets the old value, if it applies.
46: *
47: * @return The old value, if it applies.
48: */
49: public Object getOldValue() {
50: return oldValue;
51: }
52:
53: /**
54: * Gets the source of the event.
55: *
56: * @return the source of the event.
57: */
58: public abstract Object getSource();
59:
60: }
|