public final class

SwingPropertyChangeSupport

extends PropertyChangeSupport
java.lang.Object
   ↳ java.beans.PropertyChangeSupport
     ↳ javax.swing.event.SwingPropertyChangeSupport

Class Overview

This subclass of java.beans.PropertyChangeSupport is almost identical in functionality. The only difference is if constructed with SwingPropertyChangeSupport(sourceBean, true) it ensures listeners are only ever notified on the Event Dispatch Thread.

Summary

Public Constructors
SwingPropertyChangeSupport(Object sourceBean)
Constructs a SwingPropertyChangeSupport object.
SwingPropertyChangeSupport(Object sourceBean, boolean notifyOnEDT)
Constructs a SwingPropertyChangeSupport object.
Public Methods
void firePropertyChange(PropertyChangeEvent evt)
Fire an existing PropertyChangeEvent to any registered listeners.

If isNotifyOnEDT() is true and called off the Event Dispatch Thread this implementation uses SwingUtilities.invokeLater to send out the notification on the Event Dispatch Thread.

final boolean isNotifyOnEDT()
Returns notifyOnEDT property.
[Expand]
Inherited Methods
From class java.beans.PropertyChangeSupport
From class java.lang.Object

Public Constructors

public SwingPropertyChangeSupport (Object sourceBean)

Constructs a SwingPropertyChangeSupport object.

Parameters
sourceBean The bean to be given as the source for any events.
Throws
NullPointerException if sourceBean is 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 sourceBean is null

Public Methods

public void firePropertyChange (PropertyChangeEvent evt)

Fire an existing PropertyChangeEvent to any registered listeners. No event is fired if the given event's old and new values are equal and non-null.

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

Parameters
evt The PropertyChangeEvent object.
Throws
NullPointerException if evt is null

public final boolean isNotifyOnEDT ()

Returns notifyOnEDT property.

Returns
  • notifyOnEDT property