Package jmri.beans
Class SwingPropertyChangeListener
java.lang.Object
jmri.beans.SwingPropertyChangeListener
- All Implemented Interfaces:
PropertyChangeListener,EventListener
If constructed with
SwingPropertyChangeListener(listener, true) this
subclass of PropertyChangeListener ensures listener is only ever
notified on the Event Dispatch Thread.-
Constructor Summary
ConstructorsConstructorDescriptionCreate a SwingPropertyChangeListener with an associated listener that notifies the associated listener on the EDT.SwingPropertyChangeListener(PropertyChangeListener listener, boolean notifyOnEDT) Create a SwingPropertyChangeListener with an associated listener. -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidThis implementation calls the listener's implementation on the EDT ifisNotifyOnEDT()is true.
-
Constructor Details
-
SwingPropertyChangeListener
Create a SwingPropertyChangeListener with an associated listener that notifies the associated listener on the EDT.- Parameters:
listener- the listener thatPropertyChangeEvents will be passed to
-
SwingPropertyChangeListener
Create a SwingPropertyChangeListener with an associated listener.- Parameters:
listener- the listener thatPropertyChangeEvents will be passed tonotifyOnEDT- true to notify listener on the EDT; false to notify listener on current thread
-
-
Method Details
-
propertyChange
This implementation calls the listener's implementation on the EDT ifisNotifyOnEDT()is true.- Specified by:
propertyChangein interfacePropertyChangeListener
-
isNotifyOnEDT
-