public boolean hasListeners(String propertyName) { return pcs.hasListeners(propertyName); }
public boolean hasListeners(String propertyName) { return pcs.hasListeners(propertyName); }
public boolean hasListeners(String propertyName) { return pcs.hasListeners(propertyName); }
/** * Removes the specified property change listener so that it * no longer receives property change events from this object. * @param l the property change listener */ public final void removePropertyChangeListener(PropertyChangeListener l) { boolean callRemoved; synchronized (getLock()) { PropertyChangeSupport supp = (PropertyChangeSupport) getProperty(PROP_SUPPORT); if (supp == null) { return; } boolean hasListener = supp.hasListeners(null); supp.removePropertyChangeListener(l); callRemoved = hasListener && !supp.hasListeners(null); } if (callRemoved) { putProperty(PROP_SUPPORT, null); // clean the PCS, see #25417 removeNotifySuper = false; removeNotify(); if (!removeNotifySuper) { String msg = "You must call super.removeNotify() from " + getClass().getName() + ".removeNotify()"; // NOI18N err.warning(msg); } } }
/** Adds the specified property change listener to receive property * change events from this object. * @param l the property change listener */ public final void addPropertyChangeListener(PropertyChangeListener l) { boolean noListener; synchronized (getLock()) { // System.out.println ("added listener: " + l + " to: " + getClass ()); // NOI18N PropertyChangeSupport supp = (PropertyChangeSupport) getProperty(PROP_SUPPORT); if (supp == null) { // System.out.println ("Creating support"); // NOI18N putProperty(PROP_SUPPORT, supp = new PropertyChangeSupport(this)); } noListener = !supp.hasListeners(null); supp.addPropertyChangeListener(l); } if (noListener) { addNotifySuper = false; addNotify(); if (!addNotifySuper) { // [PENDING] theoretical race condition for this warning if listeners are added // and removed very quickly from two threads, I guess, and addNotify() impl is slow String msg = "You must call super.addNotify() from " + getClass().getName() + ".addNotify()"; // NOI18N err.warning(msg); } } }
public boolean hasListeners(String propertyName) { return pcs.hasListeners(propertyName); } }
public synchronized void removePropertyChangeListener(PropertyChangeListener listener) { if( support != null ) { support.removePropertyChangeListener(listener); if (!support.hasListeners(null)) { global.unregisterListener(key, this); support = null; } } }
public synchronized void removePropertyChangeListener(PropertyChangeListener listener) { if( null != support ) { support.removePropertyChangeListener(listener); if (!support.hasListeners(null)) { global.unregisterListener(type, this); support = null; } } }
/** * Removes the specified property change listener so that it * no longer receives property change events from this object. * @param l the property change listener */ public final void removePropertyChangeListener(PropertyChangeListener l) { boolean callRemoved; synchronized (getLock()) { PropertyChangeSupport supp = (PropertyChangeSupport) getProperty(PROP_SUPPORT); if (supp == null) { return; } boolean hasListener = supp.hasListeners(null); supp.removePropertyChangeListener(l); callRemoved = hasListener && !supp.hasListeners(null); } if (callRemoved) { putProperty(PROP_SUPPORT, null); // clean the PCS, see #25417 removeNotifySuper = false; removeNotify(); if (!removeNotifySuper) { String msg = "You must call super.removeNotify() from " + getClass().getName() + ".removeNotify()"; // NOI18N err.warning(msg); } } }
/** Adds the specified property change listener to receive property * change events from this object. * @param l the property change listener */ public final void addPropertyChangeListener(PropertyChangeListener l) { boolean noListener; synchronized (getLock()) { // System.out.println ("added listener: " + l + " to: " + getClass ()); // NOI18N PropertyChangeSupport supp = (PropertyChangeSupport) getProperty(PROP_SUPPORT); if (supp == null) { // System.out.println ("Creating support"); // NOI18N putProperty(PROP_SUPPORT, supp = new PropertyChangeSupport(this)); } noListener = !supp.hasListeners(null); supp.addPropertyChangeListener(l); } if (noListener) { addNotifySuper = false; addNotify(); if (!addNotifySuper) { // [PENDING] theoretical race condition for this warning if listeners are added // and removed very quickly from two threads, I guess, and addNotify() impl is slow String msg = "You must call super.addNotify() from " + getClass().getName() + ".addNotify()"; // NOI18N err.warning(msg); } } }
/** * Check if there are any listeners for a specific property, including * those registered on all properties. If <code>propertyName</code> * is null, only check for listeners registered on all properties. * * @param propertyName the property name. * @return true if there are one or more listeners for the given property */ protected final boolean hasPropertyChangeListeners(String propertyName) { return pcs.hasListeners(propertyName); }
/** * Checks if there are any listeners for a specific property, including those registered on all properties. If <code>propertyName</code> is <code>null</code>, * this method only checks for listeners registered on all properties. * @param propertyName The property name. * @return <code>true</code> if there are one or more listeners for the given property. */ public boolean hasPropertyChangeListeners(final String propertyName) { return propertyChangeSupport != null ? propertyChangeSupport.hasListeners(propertyName) : false; //if we have property change support, ask it about listeners; if there is no support, there can be no listeners }
/** * @param propertyName * propertyName * @return true if there are one or more listeners for the given property. * @see java.beans.PropertyChangeSupport#hasListeners(java.lang.String) */ protected boolean hasListeners(String propertyName) { return propertyChangeSupport.hasListeners(propertyName); } }
/** * Check if there are any listeners for a specific property, including * those registered on all properties. If <code>propertyName</code> * is null, only check for listeners registered on all properties. * * @param propertyName the property name. * @return true if there are one or more listeners for the given property */ protected final boolean hasPropertyChangeListeners(String propertyName) { return pcs.hasListeners(propertyName); }
/** * Check if there are any listeners for a specific property, including * those registered on all properties. If <code>propertyName</code> * is null, only check for listeners registered on all properties. * * @param propertyName the property name. * @return true if there are one or more listeners for the given property */ protected final boolean hasPropertyChangeListeners(String propertyName) { return pcs.hasListeners(propertyName); }
/** * Check if there are any listeners for a specific property, including * those registered on all properties. If <code>propertyName</code> * is null, only check for listeners registered on all properties. * * @param propertyName the property name. * @return true if there are one or more listeners for the given property */ protected final boolean hasPropertyChangeListeners(String propertyName) { return pcs.hasListeners(propertyName); }
/** * @param propertyName * @return * @see java.beans.PropertyChangeSupport#hasListeners(java.lang.String) */ public boolean hasListeners(String propertyName) { return pcs.hasListeners(propertyName); } /**
/** * @param propertyName * @return * @see java.beans.PropertyChangeSupport#hasListeners(java.lang.String) */ public boolean hasListeners(String propertyName) { return delegate.hasListeners(propertyName); } /**
/** * Check if there are any listeners for a specific property, including * those registered on all properties. If <code>propertyName</code> * is null, only check for listeners registered on all properties. * * @param propertyName the property name. * @return true if there are one or more listeners for the given property */ protected final boolean hasPropertyChangeListeners(String propertyName) { return pcs.hasListeners(propertyName); }
/******************************************************************************************************************* * * {@inheritDoc} * ******************************************************************************************************************/ public synchronized boolean hasListeners (final @Nonnull String propertyName) { return propertyChangeSupport.hasListeners(propertyName); }