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);
}
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;
}
Aggregations