001package ca.uhn.hl7v2.conf.spec; 002 003/** 004 * An implementation note. 005 * @author Bryan Tripp 006 */ 007public class ImpNote { 008 009 /** Holds value of property text. */ 010 private String text; 011 012 /** Utility field used by bound properties. */ 013 private java.beans.PropertyChangeSupport propertyChangeSupport = new java.beans.PropertyChangeSupport(this); 014 015 /** Utility field used by constrained properties. */ 016 private java.beans.VetoableChangeSupport vetoableChangeSupport = new java.beans.VetoableChangeSupport(this); 017 018 /** Creates a new instance of ImpNote */ 019 public ImpNote() { 020 } 021 022 /** Adds a PropertyChangeListener to the listener list. 023 * @param l The listener to add. 024 */ 025 public void addPropertyChangeListener(java.beans.PropertyChangeListener l) { 026 propertyChangeSupport.addPropertyChangeListener(l); 027 } 028 029 /** Removes a PropertyChangeListener from the listener list. 030 * @param l The listener to remove. 031 */ 032 public void removePropertyChangeListener(java.beans.PropertyChangeListener l) { 033 propertyChangeSupport.removePropertyChangeListener(l); 034 } 035 036 /** Adds a VetoableChangeListener to the listener list. 037 * @param l The listener to add. 038 */ 039 public void addVetoableChangeListener(java.beans.VetoableChangeListener l) { 040 vetoableChangeSupport.addVetoableChangeListener(l); 041 } 042 043 /** Removes a VetoableChangeListener from the listener list. 044 * @param l The listener to remove. 045 */ 046 public void removeVetoableChangeListener(java.beans.VetoableChangeListener l) { 047 vetoableChangeSupport.removeVetoableChangeListener(l); 048 } 049 050 /** Getter for property text. 051 * @return Value of property text. 052 */ 053 public String getText() { 054 return this.text; 055 } 056 057 /** Setter for property text. 058 * @param text New value of property text. 059 * 060 * @throws PropertyVetoException 061 */ 062 public void setText(String text) throws java.beans.PropertyVetoException { 063 String oldText = this.text; 064 vetoableChangeSupport.fireVetoableChange("text", oldText, text); 065 this.text = text; 066 propertyChangeSupport.firePropertyChange("text", oldText, text); 067 } 068 069}