templates.propertyChangeSupport.stg Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fulib Show documentation
Show all versions of fulib Show documentation
Fulib is a Java-code generating library.
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