View Javadoc

1   package com.explosion.utilities.preferences;
2   
3   /* =============================================================================
4    *       
5    *     Copyright 2004 Stephen Cowx
6    *
7    *     Licensed under the Apache License, Version 2.0 (the "License");
8    *     you may not use this file except in compliance with the License.
9    *     You may obtain a copy of the License at
10   *
11   *     http://www.apache.org/licenses/LICENSE-2.0
12   *
13   *     Unless required by applicable law or agreed to in writing, software
14   *     distributed under the License is distributed on an "AS IS" BASIS,
15   *     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   *     See the License for the specific language governing permissions and
17   *     limitations under the License.
18   * 
19   * =============================================================================
20   */
21  
22  /***
23   * @author Stephen
24   * Created on May 31, 2004
25   * This class represents a change to an Preference.  It has an event code
26   * and the object which changed
27   */
28  public class PreferenceChangeEvent {
29  	
30  	public static final int PROPERTY_VALUE_CHANGED = 0;
31  
32      public static final int PROPERTY_COLLECTION_VALUE_CHANGED = 1;
33      private int changeCode;
34      private Preference preference;
35  
36      public PreferenceChangeEvent(int changeCode, Preference preference)
37      {
38      	this.changeCode = changeCode;
39  		this.preference = preference;
40      }
41  	/***
42  	 * @return Returns the changeCode.
43  	 */
44  	public int getChangeCode() {
45  		return changeCode;
46  	}
47  	/***
48  	 * @param changeCode The changeCode to set.
49  	 */
50  	public void setChangeCode(int changeCode) {
51  		this.changeCode = changeCode;
52  	}
53  	/***
54  	 * @return Returns the preference.
55  	 */
56  	public Preference getPreference() {
57  		return preference;
58  	}
59  	/***
60  	 * @param preference The preference to set.
61  	 */
62  	public void setPreference(Preference preference) {
63  		this.preference = preference;
64  	}
65  }