|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dishevelled.observable.event.ObservableMapChangeSupport<K,V>
K - map key typeV - map value typepublic class ObservableMapChangeSupport<K,V>
A support class that can be used via delegation to provide
MapChangeListener and VetoableMapChangeListener
management.
| Constructor Summary | |
|---|---|
protected |
ObservableMapChangeSupport()
Create a new support class meant to be subclassed. |
|
ObservableMapChangeSupport(ObservableMap<K,V> source)
Create a new support class that fires map change and vetoable map change events with the specified source as the source of the events. |
| Method Summary | |
|---|---|
void |
addMapChangeListener(MapChangeListener<K,V> l)
Add the specified map change listener. |
void |
addVetoableMapChangeListener(VetoableMapChangeListener<K,V> l)
Add the specified vetoable map change listener. |
void |
fireMapChanged()
Fire a change event to all registered MapChangeListeners. |
void |
fireMapChanged(MapChangeEvent<K,V> e)
Fire the specified change event to all registered MapChangeListeners. |
void |
fireMapWillChange()
Fire a will change event to all registered VetoableMapChangeListeners. |
void |
fireMapWillChange(VetoableMapChangeEvent<K,V> e)
Fire the specified will change event to all registered VetoableMapChangeListeners. |
protected EventListenerList |
getEventListenerList()
Return the EventListenerList backing this
observable map support class. |
int |
getMapChangeListenerCount()
Return the number of MapChangeListeners registered
to this observable map support class. |
MapChangeListener<K,V>[] |
getMapChangeListeners()
Return an array of all MapChangeListeners, or
an empty array if none are registered. |
int |
getVetoableMapChangeListenerCount()
Return the number of VetoableMapChangeListeners
registered to this observable map support class. |
VetoableMapChangeListener<K,V>[] |
getVetoableMapChangeListeners()
Return an array of all VetoableMapChangeListeners,
or an empty array if none are registered. |
void |
removeMapChangeListener(MapChangeListener<K,V> l)
Remove the specified map change listener. |
void |
removeVetoableMapChangeListener(VetoableMapChangeListener<K,V> l)
Remove the specified vetoable map change listener. |
protected void |
setSource(ObservableMap<K,V> source)
Set the source of map change and vetoable map change events to source. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected ObservableMapChangeSupport()
public ObservableMapChangeSupport(ObservableMap<K,V> source)
source - the event source| Method Detail |
|---|
protected void setSource(ObservableMap<K,V> source)
source. Subclasses should call this method before
any of the fireX methods.
source - the event sourceprotected final EventListenerList getEventListenerList()
EventListenerList backing this
observable map support class.
EventListenerList backing this
observable map support class.public final void addMapChangeListener(MapChangeListener<K,V> l)
l - map change listener to addpublic final void removeMapChangeListener(MapChangeListener<K,V> l)
l - map change listener to removepublic final void addVetoableMapChangeListener(VetoableMapChangeListener<K,V> l)
l - vetoable map change listener to addpublic final void removeVetoableMapChangeListener(VetoableMapChangeListener<K,V> l)
l - vetoable map change listener to removepublic final MapChangeListener<K,V>[] getMapChangeListeners()
MapChangeListeners, or
an empty array if none are registered.
MapChangeListeners, or
an empty array if none are registeredpublic final int getMapChangeListenerCount()
MapChangeListeners registered
to this observable map support class.
MapChangeListeners registered
to this observable map support classpublic final VetoableMapChangeListener<K,V>[] getVetoableMapChangeListeners()
VetoableMapChangeListeners,
or an empty array if none are registered.
VetoableMapChangeListeners,
or an empty array if none are registeredpublic final int getVetoableMapChangeListenerCount()
VetoableMapChangeListeners
registered to this observable map support class.
VetoableMapChangeListeners
registered to this observable map support class
public void fireMapWillChange()
throws MapChangeVetoException
VetoableMapChangeListeners.
MapChangeVetoException - if any of the listeners veto the change
public void fireMapWillChange(VetoableMapChangeEvent<K,V> e)
throws MapChangeVetoException
VetoableMapChangeListeners.
e - will change event
MapChangeVetoException - if any of the listeners veto the changepublic void fireMapChanged()
MapChangeListeners.
public void fireMapChanged(MapChangeEvent<K,V> e)
MapChangeListeners.
e - change event
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||