/**
* Stop notifying this listener. The listener must
- * not be null. Attemps to remove a listener that is
+ * not be null. Attempts to remove a listener that is
* not registered will be silently ignored.
*/
public void removeListener(EventListener l) {
* is called on each listener from the notification thread.
*/
public void notifyChanged() {
- if (listeners != null) {
- synchronized (notifyLock) {
- if (listeners != null) {
- if (notifyThread == null) {
- notifyThread = new NotifyThread(this);
- notifyThread.setDaemon(true);
- notifyThread.start();
- }
- notifyThread.queue(listeners.toArray(new EventListener[listeners.size()]));
+ synchronized (notifyLock) {
+ if (listeners != null) {
+ if (notifyThread == null) {
+ notifyThread = new NotifyThread(this);
+ notifyThread.setDaemon(true);
+ notifyThread.start();
}
+ notifyThread.queue(listeners.toArray(new EventListener[listeners.size()]));
}
}
}