java_beans_PropertyChangeSupport


pattern_5 (1 partitions, 19 files)


java.beans.PropertyChangeSupport.getPropertyChangeListeners


Cluster 0 (19 files, similarity: 0.7601557602339186)

dmlloyd_____openjdk_____BasicDirectoryModel
    /**
     * Returns an array of all the property change listeners
     * registered on this component.
     *
     * @return all of this component's PropertyChangeListeners
     *         or an empty array if no property change
     *         listeners are currently registered
     *
     * @see      #addPropertyChangeListener
     * @see      #removePropertyChangeListener
     * @see      java.beans.PropertyChangeSupport#getPropertyChangeListeners
     *
     * @since 1.6
     */
    public PropertyChangeListener[] getPropertyChangeListeners() {
        if (changeSupport == null) {
            return new PropertyChangeListener[0];
        }
        return changeSupport.getPropertyChangeListeners();
    }
            
openjdk-mirror_____jdk7u-jdk_____Component
    /**
     * Returns an array of all the listeners which have been associated
     * with the named property.
     *
     * @return all of the PropertyChangeListeners associated with
     *         the named property; if no such listeners have been added or
     *         if propertyName is null, an empty
     *         array is returned
     *
     * @see #addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
     * @see #removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
     * @see #getPropertyChangeListeners
     * @since 1.4
     */
    public PropertyChangeListener[] getPropertyChangeListeners(
                                                                            String propertyName) {
        synchronized (getObjectLock()) {
            if (changeSupport == null) {
                return new PropertyChangeListener[0];
            }
            return changeSupport.getPropertyChangeListeners(propertyName);
        }
    }
            
unofficial-openjdk_____openjdk_____Component
    /**
     * Returns an array of all the listeners which have been associated
     * with the named property.
     *
     * @param  propertyName the property name
     * @return all of the {@code PropertyChangeListener}s associated with
     *         the named property; if no such listeners have been added or
     *         if {@code propertyName} is {@code null}, an empty
     *         array is returned
     *
     * @see #addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
     * @see #removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
     * @see #getPropertyChangeListeners
     * @since 1.4
     */
    public PropertyChangeListener[] getPropertyChangeListeners(String propertyName) {
        synchronized (getObjectLock()) {
            if (changeSupport == null) {
                return new PropertyChangeListener[0];
            }
            return changeSupport.getPropertyChangeListeners(propertyName);
        }
    }
            

pattern_1 (4 partitions, 84 files)


java.beans.PropertyChangeSupport.addPropertyChangeListener


Cluster 2 (30 files, similarity: 0.7706961379310322)

openjdk-mirror_____jdk7u-jdk_____LogManager
    /**
     * Adds an event listener to be invoked when the logging
     * properties are re-read. Adding multiple instances of
     * the same event Listener results in multiple entries
     * in the property event listener table.
     *
     * @param l  event listener
     * @exception  SecurityException  if a security manager exists and if
     *             the caller does not have LoggingPermission("control").
     * @exception NullPointerException if the PropertyChangeListener is null.
     */
    public void addPropertyChangeListener(PropertyChangeListener l) throws SecurityException {
        if (l == null) {
            throw new NullPointerException();
        }
        checkAccess();
        changes.addPropertyChangeListener(l);
    }
            
xamarin_____XobotOS_____LogManager
    /**
     * Add a {@code PropertyChangeListener}, which will be invoked when
     * the properties are reread.
     *
     * @param l
     *            the {@code PropertyChangeListener} to be added.
     */
    public void addPropertyChangeListener(PropertyChangeListener l) {
        if (l == null) {
            throw new NullPointerException();
        }
        checkAccess();
        listeners.addPropertyChangeListener(l);
    }
            
oracle_____visualvm_____WelcomeOptions
    public void addPropertyChangeListener( PropertyChangeListener l ) {
        if( null == propSupport )
            propSupport = new PropertyChangeSupport( this );
        propSupport.addPropertyChangeListener( l );
    }
            

Cluster 0 (26 files, similarity: 0.6894618707692305)

asterisk-java_____asterisk-java_____AbstractLiveObject
        if (haveToAdd)
        {
            changes.addPropertyChangeListener(propertyName, listener);
        }
            
codenameone_____CodenameOne_____AbstractProperty
	  for ( int i = 0; i < subProperties.length; ++i )
	    subProperties[i].addPropertyChangeListener( listener );
            
oracle_____visualvm_____TracerController
        if (changeSupport != null && state != STATE_SESSION_IMPOSSIBLE)
            changeSupport.addPropertyChangeListener(PROPERTY_STATE, listener);
            

pattern_3 (4 partitions, 162 files)


java.beans.PropertyChangeSupport.<init>


Cluster 2 (42 files, similarity: 0.8608726085946562)

dmlloyd_____openjdk_____KeyboardFocusManager
                if (changeSupport == null) {
                    changeSupport = new PropertyChangeSupport(this);
                }
            
unofficial-openjdk_____openjdk_____Toolkit
    private static PropertyChangeSupport createPropertyChangeSupport(Toolkit toolkit) {
        if (toolkit instanceof SunToolkit || toolkit instanceof HeadlessToolkit) {
            return new DesktopPropertyChangeSupport(toolkit);
        } else {
            return new PropertyChangeSupport(toolkit);
        }
    }
            
RPTools_____maptool_____InitiativeList
  /** @return Getter for pcs */
  private PropertyChangeSupport getPCS() {
    if (pcs == null) pcs = new PropertyChangeSupport(this);
    return pcs;
  }
            

Cluster 0 (52 files, similarity: 0.7481408921568546)

pentaho_____pentaho-reporting_____TimeZonePropertyEditor
  public TimeZonePropertyEditor() {
    propertyChangeSupport = new PropertyChangeSupport( this );
    valueConverter = new TimeZoneValueConverter();
  }
            
unofficial-openjdk_____openjdk_____BeanContextChildSupport
    /**
     * construct a BeanContextChildSupport where the JavaBean component
     * itself implements BeanContextChild, and encapsulates this, delegating
     * that interface to this implementation
     * @param bcc the underlying bean context child
     */

    public BeanContextChildSupport(BeanContextChild bcc) {
        super();

        beanContextChildPeer = (bcc != null) ? bcc : this;

        pcSupport = new PropertyChangeSupport(beanContextChildPeer);
        vcSupport = new VetoableChangeSupport(beanContextChildPeer);
    }
            
openstreetmap_____josm_____Layer
    /**
     * Create the layer and fill in the necessary components.
     * @param name Layer name
     */
    public Layer(String name) {
        this.propertyChangeSupport = new PropertyChangeSupport(this);
        setName(name);
    }
            

pattern_0 (4 partitions, 325 files)


java.beans.PropertyChangeSupport.firePropertyChange


Cluster 0 (131 files, similarity: 0.8758916516735775)

JetBrains_____intellij-community_____ZoomOptionsImpl
        if (oldValue != wheelZooming) {
            this.wheelZooming = wheelZooming;
            propertyChangeSupport.firePropertyChange(ATTR_WHEEL_ZOOMING, oldValue, this.wheelZooming);
        }
            
dmlloyd_____openjdk_____BasicDirectoryModel
    /**
     * Support for reporting bound property changes for boolean properties.
     * This method can be called when a bound property has changed and it will
     * send the appropriate PropertyChangeEvent to any registered
     * PropertyChangeListeners.
     *
     * @param propertyName the property whose value has changed
     * @param oldValue the property's previous value
     * @param newValue the property's new value
     *
     * @since 1.6
     */
    protected void firePropertyChange(String propertyName,
                                      Object oldValue, Object newValue) {
        if (changeSupport != null) {
            changeSupport.firePropertyChange(propertyName,
                                             oldValue, newValue);
        }
    }
            
jindrapetrik_____jpexs-decompiler_____SyntaxDocument
        if (canUndoState != value) {
            // System.out.println("canUndo = " + value);
            canUndoState = value;
            propSupport.firePropertyChange(CAN_UNDO, !value, value);
        }
            

pattern_2 (3 partitions, 40 files)


java.beans.PropertyChangeSupport.removePropertyChangeListener


Cluster 0 (23 files, similarity: 0.9585168774703532)

cloudsec_____ajvm_____LogManager
  /**
   * Unregisters a listener.
   *
   * If listener has not been registered previously,
   * nothing happens.  Also, no exception is thrown if
   * listener is null.
   */
  public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
  {
    if (listener != null)
      pcs.removePropertyChangeListener(listener);
  }
            
openjdk-mirror_____jdk7u-jdk_____KeyboardFocusManager
                if (changeSupport != null) {
                    changeSupport.removePropertyChangeListener(propertyName,
                                                               listener);
                }
            
capitalone_____Hydrograph_____Model
	/**
	 * Remove a PropertyChangeListener from this component.
	 * @param listner PropertyChangeListener instance
	 */
	public synchronized void removePropertyChangeListener(PropertyChangeListener listner) {
		if (listner != null) {
			propertyChangeSupport.removePropertyChangeListener(listner);
		}
	}
            

Cluster 1 (11 files, similarity: 0.9165410363636364)

praxis-live_____praxis-live_____ArgumentPropertyAdaptor
    public void removePropertyChangeListener(PropertyChangeListener listener) {
        pcs.removePropertyChangeListener(listener);
        if (!alwaysActive && !pcs.hasListeners(null)) {
            setActive(false);
        }
    }
            
RaiMan_____SikuliX-2014_____LinkModel
    public void removePropertyChangeListener(PropertyChangeListener l) {
        if (propertyChangeSupport == null)
            return;
        propertyChangeSupport.removePropertyChangeListener(l);
    }
            
dmlloyd_____openjdk_____AppContext
    /**
     * Removes a PropertyChangeListener from the listener list for a specific
     * property. This method should be used to remove PropertyChangeListeners
     * that were registered for a specific bound property.
     * 

* If listener is null, no exception is thrown and no action is performed. * * @param propertyName a valid property name * @param listener the PropertyChangeListener to be removed * * @see #addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) * @see #getPropertyChangeListeners(java.lang.String) * @see PropertyChangeSupport#removePropertyChangeListener(java.beans.PropertyChangeListener) */ public synchronized void removePropertyChangeListener( String propertyName, PropertyChangeListener listener) { if (listener == null || changeSupport == null) { return; } changeSupport.removePropertyChangeListener(propertyName, listener); }