|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dishevelled.observable.event.ObservableCollectionChangeSupport<E>
E - collection element typepublic class ObservableCollectionChangeSupport<E>
A support class that can be used via delegation to provide
CollectionChangeListener and VetoableCollectionChangeListener
management.
| Constructor Summary | |
|---|---|
protected |
ObservableCollectionChangeSupport()
Create a new support class meant to be subclassed. |
|
ObservableCollectionChangeSupport(ObservableCollection<E> source)
Create a new support class that fires collection change and vetoable collection change events with the specified source as the source of the events. |
| Method Summary | |
|---|---|
void |
addCollectionChangeListener(CollectionChangeListener<E> l)
Add the specified collection change listener. |
void |
addVetoableCollectionChangeListener(VetoableCollectionChangeListener<E> l)
Add the specified vetoable collection change listener. |
void |
fireCollectionChanged()
Fire a change event to all registered CollectionChangeListeners. |
void |
fireCollectionChanged(CollectionChangeEvent<E> e)
Fire the specified change event to all registered CollectionChangeListeners. |
void |
fireCollectionWillChange()
Fire a will change event to all registered VetoableCollectionChangeListeners. |
void |
fireCollectionWillChange(VetoableCollectionChangeEvent<E> e)
Fire the specified will change event to all registered VetoableCollectionChangeListeners. |
int |
getCollectionChangeListenerCount()
Return the number of CollectionChangeListeners registered
to this observable collection support class. |
CollectionChangeListener<E>[] |
getCollectionChangeListeners()
Return an array of all CollectionChangeListeners, or
an empty array if none are registered. |
protected EventListenerList |
getEventListenerList()
Return the EventListenerList backing this
observable collection support class. |
int |
getVetoableCollectionChangeListenerCount()
Return the number of VetoableCollectionChangeListeners
registered to this observable collection support class. |
VetoableCollectionChangeListener<E>[] |
getVetoableCollectionChangeListeners()
Return an array of all VetoableCollectionChangeListeners,
or an empty array if none are registered. |
void |
removeCollectionChangeListener(CollectionChangeListener<E> l)
Remove the specified collection change listener. |
void |
removeVetoableCollectionChangeListener(VetoableCollectionChangeListener<E> l)
Remove the specified vetoable collection change listener. |
protected void |
setSource(ObservableCollection<E> source)
Set the source of collection change and vetoable collection 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 ObservableCollectionChangeSupport()
public ObservableCollectionChangeSupport(ObservableCollection<E> source)
source - the event source| Method Detail |
|---|
protected void setSource(ObservableCollection<E> source)
source. Subclasses should call this method before
any of the fireX methods.
source - the event sourceprotected final EventListenerList getEventListenerList()
EventListenerList backing this
observable collection support class.
EventListenerList backing this
observable collection support class.public final void addCollectionChangeListener(CollectionChangeListener<E> l)
l - collection change listener to addpublic final void removeCollectionChangeListener(CollectionChangeListener<E> l)
l - collection change listener to removepublic final void addVetoableCollectionChangeListener(VetoableCollectionChangeListener<E> l)
l - vetoable collection change listener to addpublic final void removeVetoableCollectionChangeListener(VetoableCollectionChangeListener<E> l)
l - vetoable collection change listener to removepublic final CollectionChangeListener<E>[] getCollectionChangeListeners()
CollectionChangeListeners, or
an empty array if none are registered.
CollectionChangeListeners, or
an empty array if none are registeredpublic final int getCollectionChangeListenerCount()
CollectionChangeListeners registered
to this observable collection support class.
CollectionChangeListeners registered
to this observable collection support classpublic final VetoableCollectionChangeListener<E>[] getVetoableCollectionChangeListeners()
VetoableCollectionChangeListeners,
or an empty array if none are registered.
VetoableCollectionChangeListeners,
or an empty array if none are registeredpublic final int getVetoableCollectionChangeListenerCount()
VetoableCollectionChangeListeners
registered to this observable collection support class.
VetoableCollectionChangeListeners
registered to this observable collection support class
public void fireCollectionWillChange()
throws CollectionChangeVetoException
VetoableCollectionChangeListeners.
CollectionChangeVetoException - if any of the listeners veto the change
public void fireCollectionWillChange(VetoableCollectionChangeEvent<E> e)
throws CollectionChangeVetoException
VetoableCollectionChangeListeners.
e - will change event
CollectionChangeVetoException - if any of the listeners veto the changepublic void fireCollectionChanged()
CollectionChangeListeners.
public void fireCollectionChanged(CollectionChangeEvent<E> e)
CollectionChangeListeners.
e - change event
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||