Package jmri.beans
Class SwingPropertyChangeListener
- java.lang.Object
-
- jmri.beans.SwingPropertyChangeListener
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.util.EventListener
public class SwingPropertyChangeListener extends java.lang.Object implements java.beans.PropertyChangeListener
If constructed withSwingPropertyChangeListener(listener, true)
this subclass ofPropertyChangeListener
ensures listener is only ever notified on the Event Dispatch Thread.
-
-
Constructor Summary
Constructors Constructor Description SwingPropertyChangeListener(java.beans.PropertyChangeListener listener)
Create a SwingPropertyChangeListener with an associated listener that notifies the associated listener on the EDT.SwingPropertyChangeListener(java.beans.PropertyChangeListener listener, boolean notifyOnEDT)
Create a SwingPropertyChangeListener with an associated listener.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isNotifyOnEDT()
void
propertyChange(java.beans.PropertyChangeEvent evt)
This implementation calls the listener's implementation on the EDT ifisNotifyOnEDT()
is true.
-
-
-
Constructor Detail
-
SwingPropertyChangeListener
public SwingPropertyChangeListener(java.beans.PropertyChangeListener listener)
Create a SwingPropertyChangeListener with an associated listener that notifies the associated listener on the EDT.- Parameters:
listener
- the listener thatPropertyChangeEvent
s will be passed to
-
SwingPropertyChangeListener
public SwingPropertyChangeListener(java.beans.PropertyChangeListener listener, boolean notifyOnEDT)
Create a SwingPropertyChangeListener with an associated listener.- Parameters:
listener
- the listener thatPropertyChangeEvent
s will be passed tonotifyOnEDT
- true to notify listener on the EDT; false to notify listener on current thread
-
-
Method Detail
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent evt)
This implementation calls the listener's implementation on the EDT ifisNotifyOnEDT()
is true.- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
isNotifyOnEDT
public boolean isNotifyOnEDT()
-
-