public class DefaultChangeEventSupport extends Object implements ChangeEventSupport
| Modifier and Type | Field and Description |
|---|---|
protected ChangeEvent |
changeEvent
Only one
ChangeEvent is needed
instance since the
event's only state is the source property. |
protected EventListenerList |
listenerList
holds the registered listeners
|
| Constructor and Description |
|---|
DefaultChangeEventSupport(Object eventSource) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChangeListener(ChangeListener l) |
void |
fireStateChanged()
Notifies all listeners that have registered interest for
notification on this event type.
|
ChangeListener[] |
getChangeListeners()
Returns an array of all the
ChangeListeners added
with addChangeListener(). |
void |
removeChangeListener(ChangeListener l)
Removes a ChangeListener.
|
protected EventListenerList listenerList
protected transient ChangeEvent changeEvent
ChangeEvent is needed
instance since the
event's only state is the source property. The source of events
generated is always "this".public DefaultChangeEventSupport(Object eventSource)
public void addChangeListener(ChangeListener l)
addChangeListener in interface ChangeEventSupportpublic void removeChangeListener(ChangeListener l)
ChangeEventSupportremoveChangeListener in interface ChangeEventSupportl - the listener to be removedpublic ChangeListener[] getChangeListeners()
ChangeEventSupportChangeListeners added
with addChangeListener().getChangeListeners in interface ChangeEventSupportChangeListeners added or an empty
array if no listeners have been addedpublic void fireStateChanged()
fireStateChanged in interface ChangeEventSupportEventListenerListCopyright © 2016. All rights reserved.