Home » openjdk-7 » javax » swing » event » [javadoc | source]
javax.swing.event
public final class: SwingPropertyChangeSupport [javadoc | source]
java.lang.Object
   java.beans.PropertyChangeSupport
      javax.swing.event.SwingPropertyChangeSupport

All Implemented Interfaces:
    Serializable

This subclass of {@code java.beans.PropertyChangeSupport} is almost identical in functionality. The only difference is if constructed with {@code SwingPropertyChangeSupport(sourceBean, true)} it ensures listeners are only ever notified on the Event Dispatch Thread.
Field Summary
static final  long serialVersionUID     
Fields inherited from java.beans.PropertyChangeSupport:
serialVersionUID
Constructor:
 public SwingPropertyChangeSupport(Object sourceBean) 
    Constructs a SwingPropertyChangeSupport object.
    Parameters:
    sourceBean - The bean to be given as the source for any events.
    Throws:
    NullPointerException - if {@code sourceBean} is {@code null}
 public SwingPropertyChangeSupport(Object sourceBean,
    boolean notifyOnEDT) 
    Constructs a SwingPropertyChangeSupport object.
    Parameters:
    sourceBean - the bean to be given as the source for any events
    notifyOnEDT - whether to notify listeners on the Event Dispatch Thread only
    Throws:
    NullPointerException - if {@code sourceBean} is {@code null}
    since: 1.6 -
Method from javax.swing.event.SwingPropertyChangeSupport Summary:
firePropertyChange,   isNotifyOnEDT
Methods from java.beans.PropertyChangeSupport:
addPropertyChangeListener,   addPropertyChangeListener,   fireIndexedPropertyChange,   fireIndexedPropertyChange,   fireIndexedPropertyChange,   firePropertyChange,   firePropertyChange,   firePropertyChange,   firePropertyChange,   getPropertyChangeListeners,   getPropertyChangeListeners,   hasListeners,   removePropertyChangeListener,   removePropertyChangeListener
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.swing.event.SwingPropertyChangeSupport Detail:
 public  void firePropertyChange(PropertyChangeEvent evt) 
    {@inheritDoc}

    If #isNotifyOnEDT is {@code true} and called off the Event Dispatch Thread this implementation uses {@code SwingUtilities.invokeLater} to send out the notification on the Event Dispatch Thread. This ensures listeners are only ever notified on the Event Dispatch Thread.

 public final boolean isNotifyOnEDT() 
    Returns {@code notifyOnEDT} property.