All Downloads are FREE. Search and download functionalities are using the official Maven repository.

templates.propertyChangeSupport.stg Maven / Gradle / Ivy

There is a newer version: 1.6.2
Show newest version

addPropertyChangeListener1() ::=
<<
   public boolean addPropertyChangeListener(PropertyChangeListener listener)
   {
      if (listeners == null)
      {
         listeners = new PropertyChangeSupport(this);
      }
      listeners.addPropertyChangeListener(listener);
      return true;
   }
>>



addPropertyChangeListener2() ::=
<<
   public boolean addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
   {
      if (listeners == null)
      {
         listeners = new PropertyChangeSupport(this);
      }
      listeners.addPropertyChangeListener(propertyName, listener);
      return true;
   }
>>



removePropertyChangeListener1() ::=
<<
   public boolean removePropertyChangeListener(PropertyChangeListener listener)
   {
      if (listeners != null)
      {
         listeners.removePropertyChangeListener(listener);
      }
      return true;
   }
>>



removePropertyChangeListener2() ::=
<<
   public boolean removePropertyChangeListener(String propertyName,PropertyChangeListener listener)
   {
      if (listeners != null)
      {
         listeners.removePropertyChangeListener(propertyName, listener);
      }
      return true;
   }
>>



firePropertyChange() ::= <<
   public boolean firePropertyChange(String propertyName, Object oldValue, Object newValue)
   {
      if (listeners != null)
      {
         listeners.firePropertyChange(propertyName, oldValue, newValue);
         return true;
      }
      return false;
   }
>>





© 2015 - 2025 Weber Informatics LLC | Privacy Policy