View Javadoc

1   package ca.uhn.hl7v2.conf.spec;
2   
3   /**
4    * An implementation note.  
5    * @author Bryan Tripp
6    */
7   public class ImpNote {
8       
9       /** Holds value of property text. */
10      private String text;
11      
12      /** Utility field used by bound properties. */
13      private java.beans.PropertyChangeSupport propertyChangeSupport =  new java.beans.PropertyChangeSupport(this);
14      
15      /** Utility field used by constrained properties. */
16      private java.beans.VetoableChangeSupport vetoableChangeSupport =  new java.beans.VetoableChangeSupport(this);
17      
18      /** Creates a new instance of ImpNote */
19      public ImpNote() {
20      }
21      
22      /** Adds a PropertyChangeListener to the listener list.
23       * @param l The listener to add.
24       */
25      public void addPropertyChangeListener(java.beans.PropertyChangeListener l) {
26          propertyChangeSupport.addPropertyChangeListener(l);
27      }    
28      
29      /** Removes a PropertyChangeListener from the listener list.
30       * @param l The listener to remove.
31       */
32      public void removePropertyChangeListener(java.beans.PropertyChangeListener l) {
33          propertyChangeSupport.removePropertyChangeListener(l);
34      }    
35      
36      /** Adds a VetoableChangeListener to the listener list.
37       * @param l The listener to add.
38       */
39      public void addVetoableChangeListener(java.beans.VetoableChangeListener l) {
40          vetoableChangeSupport.addVetoableChangeListener(l);
41      }
42      
43      /** Removes a VetoableChangeListener from the listener list.
44       * @param l The listener to remove.
45       */
46      public void removeVetoableChangeListener(java.beans.VetoableChangeListener l) {
47          vetoableChangeSupport.removeVetoableChangeListener(l);
48      }
49      
50      /** Getter for property text.
51       * @return Value of property text.
52       */
53      public String getText() {
54          return this.text;
55      }
56      
57      /** Setter for property text.
58       * @param text New value of property text.
59       *
60       * @throws PropertyVetoException
61       */
62      public void setText(String text) throws java.beans.PropertyVetoException {
63          String oldText = this.text;
64          vetoableChangeSupport.fireVetoableChange("text", oldText, text);
65          this.text = text;
66          propertyChangeSupport.firePropertyChange("text", oldText, text);
67      }
68      
69  }