Search in sources :

Example 21 with PropertyChangeSupport

use of java.beans.PropertyChangeSupport in project jdk8u_jdk by JetBrains.

the class Component method firePropertyChange.

/**
     * Support for reporting bound property changes for Object 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
     */
protected void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
    PropertyChangeSupport changeSupport;
    synchronized (getObjectLock()) {
        changeSupport = this.changeSupport;
    }
    if (changeSupport == null || (oldValue != null && newValue != null && oldValue.equals(newValue))) {
        return;
    }
    changeSupport.firePropertyChange(propertyName, oldValue, newValue);
}
Also used : PropertyChangeSupport(java.beans.PropertyChangeSupport)

Example 22 with PropertyChangeSupport

use of java.beans.PropertyChangeSupport in project jdk8u_jdk by JetBrains.

the class SystemTray method getCurrentChangeSupport.

/**
     * Returns the current PropertyChangeSupport instance for the
     * calling thread's context.
     *
     * @return this thread's context's PropertyChangeSupport
     */
private synchronized PropertyChangeSupport getCurrentChangeSupport() {
    PropertyChangeSupport changeSupport = (PropertyChangeSupport) AppContext.getAppContext().get(SystemTray.class);
    if (changeSupport == null) {
        changeSupport = new PropertyChangeSupport(this);
        AppContext.getAppContext().put(SystemTray.class, changeSupport);
    }
    return changeSupport;
}
Also used : PropertyChangeSupport(java.beans.PropertyChangeSupport)

Aggregations

PropertyChangeSupport (java.beans.PropertyChangeSupport)22 PropertyChangeEvent (java.beans.PropertyChangeEvent)10 PropertyChangeListener (java.beans.PropertyChangeListener)6 PropertyChangeListenerProxy (java.beans.PropertyChangeListenerProxy)4 HttpResponse (com.microsoft.azure.hdinsight.sdk.common.HttpResponse)2 IOException (java.io.IOException)2 UISettings (com.intellij.ide.ui.UISettings)1 UISettingsListener (com.intellij.ide.ui.UISettingsListener)1 JBScrollPane (com.intellij.ui.components.JBScrollPane)1 Server (com.nimbusbase.nimbusbase.Server)1 SystemTray (java.awt.SystemTray)1 TrayIcon (java.awt.TrayIcon)1 Window (java.awt.Window)1 ActionEvent (java.awt.event.ActionEvent)1 ActionListener (java.awt.event.ActionListener)1 InvocationEvent (java.awt.event.InvocationEvent)1 VetoableChangeListener (java.beans.VetoableChangeListener)1 VetoableChangeSupport (java.beans.VetoableChangeSupport)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1