Package org.openstreetmap.josm.gui.util
Class ChangeNotifier
- java.lang.Object
-
- org.openstreetmap.josm.gui.util.ChangeNotifier
-
- Direct Known Subclasses:
AbstractListMergeModel
,AbstractTextComponentValidator
,HelpBrowserHistory
,HistoryBrowserModel
,PluginPreferencesModel
,PropertiesMergeModel
public class ChangeNotifier extends java.lang.Object
Replacement tojava.util.Observable
class, deprecated with Java 9.- Since:
- 10210
-
-
Field Summary
Fields Modifier and Type Field Description private javax.swing.event.ChangeEvent
changeEvent
Only oneChangeEvent
is needed per button model instance since the event's only state is the source property.private javax.swing.event.EventListenerList
listenerList
Stores the listeners on this model.
-
Constructor Summary
Constructors Constructor Description ChangeNotifier()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChangeListener(javax.swing.event.ChangeListener l)
Adds aChangeListener
.protected void
fireStateChanged()
Notifies all listeners that have registered interest for notification on this event type.void
removeChangeListener(javax.swing.event.ChangeListener l)
Removes aChangeListener
.
-
-
-
Field Detail
-
listenerList
private final javax.swing.event.EventListenerList listenerList
Stores the listeners on this model.
-
changeEvent
private javax.swing.event.ChangeEvent changeEvent
Only oneChangeEvent
is needed per button model instance since the event's only state is the source property. The source of events generated is always "this".
-
-
Constructor Detail
-
ChangeNotifier
public ChangeNotifier()
-
-
Method Detail
-
addChangeListener
public final void addChangeListener(javax.swing.event.ChangeListener l)
Adds aChangeListener
.- Parameters:
l
- the listener to add
-
removeChangeListener
public final void removeChangeListener(javax.swing.event.ChangeListener l)
Removes aChangeListener
.- Parameters:
l
- the listener to add
-
fireStateChanged
protected final void fireStateChanged()
Notifies all listeners that have registered interest for notification on this event type. The event instance is created lazily.
-
-