org.openide.util
Class WeakListenerImpl.PropertyChange

java.lang.Object
  extended by org.openide.util.WeakListenerImpl
      extended by org.openide.util.WeakListenerImpl.PropertyChange
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.util.EventListener
Enclosing class:
WeakListenerImpl

static class WeakListenerImpl.PropertyChange
extends WeakListenerImpl
implements java.beans.PropertyChangeListener

Weak property change listener


Nested Class Summary
 
Nested classes/interfaces inherited from class org.openide.util.WeakListenerImpl
WeakListenerImpl.Change, WeakListenerImpl.Document, WeakListenerImpl.Focus, WeakListenerImpl.PropertyChange, WeakListenerImpl.VetoableChange
 
Field Summary
 
Fields inherited from class org.openide.util.WeakListenerImpl
listenerClass
 
Constructor Summary
WeakListenerImpl.PropertyChange(java.lang.Class clazz, java.beans.PropertyChangeListener l)
          Constructor.
WeakListenerImpl.PropertyChange(java.beans.PropertyChangeListener l)
          Constructor.
 
Method Summary
 void propertyChange(java.beans.PropertyChangeEvent ev)
          Tests if the object we reference to still exists and if so, delegate to it.
protected  java.lang.String removeMethodName()
          Method name to use for removing the listener.
 
Methods inherited from class org.openide.util.WeakListenerImpl
create, get, getImplementator, setSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WeakListenerImpl.PropertyChange

public WeakListenerImpl.PropertyChange(java.beans.PropertyChangeListener l)
Constructor.

Parameters:
l - listener to delegate to

WeakListenerImpl.PropertyChange

WeakListenerImpl.PropertyChange(java.lang.Class clazz,
                                java.beans.PropertyChangeListener l)
Constructor.

Parameters:
clazz - required class
l - listener to delegate to
Method Detail

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent ev)
Tests if the object we reference to still exists and if so, delegate to it. Otherwise remove from the source if it has removePropertyChangeListener method.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener

removeMethodName

protected java.lang.String removeMethodName()
Method name to use for removing the listener.

Specified by:
removeMethodName in class WeakListenerImpl
Returns:
name of method of the source object that should be used to remove the listener from listening on source of events