1 | /* |
---|
2 | * $Id: AttributeChangeEvent.java,v 1.3 2003/08/22 23:02:31 dwd Exp $ |
---|
3 | * |
---|
4 | * This software is provided by NOAA for full, free and open release. It is |
---|
5 | * understood by the recipient/user that NOAA assumes no liability for any |
---|
6 | * errors contained in the code. Although this software is released without |
---|
7 | * conditions or restrictions in its use, it is expected that appropriate |
---|
8 | * credit be given to its author and to the National Oceanic and Atmospheric |
---|
9 | * Administration should the software be included by the recipient as an |
---|
10 | * element in other product development. |
---|
11 | */ |
---|
12 | package gov.noaa.pmel.sgt; |
---|
13 | |
---|
14 | import java.beans.PropertyChangeEvent; |
---|
15 | |
---|
16 | /** |
---|
17 | * A class for wrapping local and remote property change events for attributes. |
---|
18 | * @author Donald Denbo |
---|
19 | * @version $Revision: 1.3 $ |
---|
20 | * @since 3.0 |
---|
21 | */ |
---|
22 | public class AttributeChangeEvent extends PropertyChangeEvent { |
---|
23 | private boolean local_ = true; |
---|
24 | |
---|
25 | public AttributeChangeEvent(Object source, |
---|
26 | String propertyName, |
---|
27 | Object oldValue, |
---|
28 | Object newValue) { |
---|
29 | this(source, propertyName, oldValue, newValue, true); |
---|
30 | } |
---|
31 | |
---|
32 | public AttributeChangeEvent(Object source, |
---|
33 | String propertyName, |
---|
34 | Object oldValue, |
---|
35 | Object newValue, |
---|
36 | boolean local) { |
---|
37 | super(source, propertyName, oldValue, newValue); |
---|
38 | local_ = local; |
---|
39 | } |
---|
40 | |
---|
41 | public boolean isLocal() { |
---|
42 | return local_; |
---|
43 | } |
---|
44 | } |
---|