org.w3c.tools.jdbc
Class JdbcPropertyChangeSupport

java.lang.Object
  extended by java.beans.PropertyChangeSupport
      extended by org.w3c.tools.jdbc.JdbcPropertyChangeSupport
All Implemented Interfaces:
java.io.Serializable

public class JdbcPropertyChangeSupport
extends java.beans.PropertyChangeSupport

This subclass of java.beans.PropertyChangeSupport is identical in functionality except that it fire a PropertyChangeEvent even if the old value and the new value are identicals.

See Also:
Serialized Form

Constructor Summary
JdbcPropertyChangeSupport(java.lang.Object sourceBean)
          Constructor
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Add a PropertyChangeListener to the listener list.
 void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
          Add a PropertyChangeListener for a specific property.
 void firePropertyChange(java.beans.PropertyChangeEvent evt)
          Fire an existing PropertyChangeEvent to any registered listeners.
 void firePropertyChange(java.lang.String propertyName, boolean oldValue, boolean newValue)
          Report a boolean bound property update to any registered listeners.
 void firePropertyChange(java.lang.String propertyName, int oldValue, int newValue)
          Report an int bound property update to any registered listeners.
 void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
          Report a bound property update to any registered listeners.
 boolean hasListeners(java.lang.String propertyName)
          Check if there are any listeners for a specific property.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Remove a PropertyChangeListener from the listener list.
 void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
          Remove a PropertyChangeListener for a specific property.
 
Methods inherited from class java.beans.PropertyChangeSupport
fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, getPropertyChangeListeners, getPropertyChangeListeners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcPropertyChangeSupport

public JdbcPropertyChangeSupport(java.lang.Object sourceBean)
Constructor

Parameters:
sourceBean - our bean
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list. The listener is registered for all properties.

Overrides:
addPropertyChangeListener in class java.beans.PropertyChangeSupport
Parameters:
listener - The PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.

Overrides:
removePropertyChangeListener in class java.beans.PropertyChangeSupport
Parameters:
listener - The PropertyChangeListener to be removed

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String propertyName,
                                      java.beans.PropertyChangeListener listener)
Add a PropertyChangeListener for a specific property. The listener will be invoked only when a call on firePropertyChange names that specific property.

Overrides:
addPropertyChangeListener in class java.beans.PropertyChangeSupport
Parameters:
propertyName - The name of the property to listen on.
listener - The PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String propertyName,
                                         java.beans.PropertyChangeListener listener)
Remove a PropertyChangeListener for a specific property.

Overrides:
removePropertyChangeListener in class java.beans.PropertyChangeSupport
Parameters:
propertyName - The name of the property that was listened on.
listener - The PropertyChangeListener to be removed

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               java.lang.Object oldValue,
                               java.lang.Object newValue)
Report a bound property update to any registered listeners. No event is fired if old and new are equal and non-null.

Overrides:
firePropertyChange in class java.beans.PropertyChangeSupport
Parameters:
propertyName - The programmatic name of the property that was changed.
oldValue - The old value of the property.
newValue - The new value of the property.

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               int oldValue,
                               int newValue)
Report an int bound property update to any registered listeners. No event is fired if old and new are equal and non-null.

This is merely a convenience wrapper around the more general firePropertyChange method that takes Object values.

Overrides:
firePropertyChange in class java.beans.PropertyChangeSupport
Parameters:
propertyName - The programmatic name of the property that was changed.
oldValue - The old value of the property.
newValue - The new value of the property.

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               boolean oldValue,
                               boolean newValue)
Report a boolean bound property update to any registered listeners. No event is fired if old and new are equal and non-null.

This is merely a convenience wrapper around the more general firePropertyChange method that takes Object values.

Overrides:
firePropertyChange in class java.beans.PropertyChangeSupport
Parameters:
propertyName - The programmatic name of the property that was changed.
oldValue - The old value of the property.
newValue - The new value of the property.

firePropertyChange

public void firePropertyChange(java.beans.PropertyChangeEvent evt)
Fire an existing PropertyChangeEvent to any registered listeners. No event is fired if the given event's old and new values are equal and non-null.

Overrides:
firePropertyChange in class java.beans.PropertyChangeSupport
Parameters:
evt - The PropertyChangeEvent object.

hasListeners

public boolean hasListeners(java.lang.String propertyName)
Check if there are any listeners for a specific property.

Overrides:
hasListeners in class java.beans.PropertyChangeSupport
Parameters:
propertyName - the property name.
Returns:
true if there are ore or more listeners for the given property