update author list in license for (JAL-826)
[jalview.git] / src / jalview / gui / JalviewChangeSupport.java
1 /*******************************************************************************
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3  * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
4  *
5  * This file is part of Jalview.
6  *
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10  *
11  * Jalview is distributed in the hope that it will be useful, but 
12  * WITHOUT ANY WARRANTY; without even the implied warranty 
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14  * PURPOSE.  See the GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
17  *******************************************************************************/
18 package jalview.gui;
19
20 import java.beans.PropertyChangeEvent;
21 import java.beans.PropertyChangeListener;
22
23 public class JalviewChangeSupport implements PropertyChangeListener
24 {
25   public void propertyChange(PropertyChangeEvent evt)
26   {
27     // Handle change events - most are simply routed to other sources
28     changeSupport.firePropertyChange(evt);
29   }
30
31   /**
32    * change listeners are notified of changes to resources so they can update
33    * their state. E.g. - the 'services' property notifies when the available
34    * set of web service endpoints have changed.
35    */
36   private java.beans.PropertyChangeSupport changeSupport = new java.beans.PropertyChangeSupport(
37           this);
38
39   /**
40    * @param propertyName
41    * @param listener
42    * @see java.beans.PropertyChangeSupport#addPropertyChangeListener(java.lang.String,
43    *      java.beans.PropertyChangeListener)
44    */
45   public void addJalviewPropertyChangeListener(String propertyName,
46           PropertyChangeListener listener)
47   {
48     changeSupport.addPropertyChangeListener(propertyName, listener);
49   }
50
51   /**
52    * @param listener
53    * @see java.beans.PropertyChangeSupport#addPropertyChangeListener(java.beans.PropertyChangeListener)
54    */
55   public void addJalviewPropertyChangeListener(
56           PropertyChangeListener listener)
57   {
58     changeSupport.addPropertyChangeListener(listener);
59   }
60
61   /*
62    * @param propertyName
63    * 
64    * @param oldValue
65    * 
66    * @param newValue
67    * 
68    * @see
69    * java.beans.PropertyChangeSupport#firePropertyChange(java.lang.String,
70    * java.lang.Object, java.lang.Object) public void firePropertyChange(String
71    * propertyName, Object oldValue, Object newValue) {
72    * changeSupport.firePropertyChange(propertyName, oldValue, newValue); }
73    */
74
75   /**
76    * @param propertyName
77    * @param listener
78    * @see java.beans.PropertyChangeSupport#removePropertyChangeListener(java.lang.String,
79    *      java.beans.PropertyChangeListener)
80    */
81   public void removeJalviewPropertyChangeListener(String propertyName,
82           PropertyChangeListener listener)
83   {
84     changeSupport.removePropertyChangeListener(propertyName, listener);
85   }
86
87 }