public final class AsynchronousPropertyChangeWrapper
extends java.lang.Object
implements java.lang.Runnable, java.beans.PropertyChangeListener
PropertyChangeListener
. If
more than one event is received while the asynchronous, wrapped PropertyChangeListener
is processing an event, then all events but the last
are discarded. This implementation is good for PropertyChangeEvent
s
that are self-contained and completely independent of one another.Constructor and Description |
---|
AsynchronousPropertyChangeWrapper(java.beans.PropertyChangeListener listener)
Constructs from nothing.
|
Modifier and Type | Method and Description |
---|---|
void |
doRemove()
_more_
|
void |
propertyChange(java.beans.PropertyChangeEvent event)
Receives a
PropertyChangeEvent for asynchronous handling. |
void |
run()
Executes the asynchronous,
PropertyChangeEvent -handling thread. |
public AsynchronousPropertyChangeWrapper(java.beans.PropertyChangeListener listener)
PropertyChangeEvent
thread will be
started.listener
- The listener to be wrapped.java.lang.NullPointerException
- if the listener is null
.public void doRemove()
public final void run()
PropertyChangeEvent
-handling thread.run
in interface java.lang.Runnable
public final void propertyChange(java.beans.PropertyChangeEvent event)
PropertyChangeEvent
for asynchronous handling. The
event is placed on the event-queue, replacing any previous event.propertyChange
in interface java.beans.PropertyChangeListener
event
- The event to receive. May be null
.