|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vaadin.data.util.AbstractContainer
public abstract class AbstractContainer
Abstract container class that manages event listeners and sending events to
them (PropertySetChangeNotifier
, ItemSetChangeNotifier
).
Note that this class provides the internal implementations for both types of
events and notifiers as protected methods, but does not implement the
PropertySetChangeNotifier
and ItemSetChangeNotifier
interfaces directly. This way, subclasses can choose not to implement them.
Subclasses implementing those interfaces should also override the
corresponding #addListener()
and #removeListener()
methods to
make them public.
Nested Class Summary | |
---|---|
protected static class |
AbstractContainer.BaseItemSetChangeEvent
An event object specifying the container whose Item set has
changed. |
protected static class |
AbstractContainer.BasePropertySetChangeEvent
An event object specifying the container whose Property set
has changed. |
Nested classes/interfaces inherited from interface com.vaadin.data.Container |
---|
Container.Editor, Container.Filter, Container.Filterable, Container.Hierarchical, Container.Indexed, Container.ItemSetChangeEvent, Container.ItemSetChangeListener, Container.ItemSetChangeNotifier, Container.Ordered, Container.PropertySetChangeEvent, Container.PropertySetChangeListener, Container.PropertySetChangeNotifier, Container.SimpleFilterable, Container.Sortable, Container.Viewer |
Constructor Summary | |
---|---|
AbstractContainer()
|
Method Summary | |
---|---|
protected void |
addListener(Container.ItemSetChangeListener listener)
Implementation of the corresponding method in ItemSetChangeNotifier , override with the corresponding public
method and implement the interface to use this. |
protected void |
addListener(Container.PropertySetChangeListener listener)
Implementation of the corresponding method in PropertySetChangeNotifier , override with the corresponding public
method and implement the interface to use this. |
protected void |
fireContainerPropertySetChange()
Sends a simple Property set change event to all interested listeners. |
protected void |
fireContainerPropertySetChange(Container.PropertySetChangeEvent event)
Sends a Property set change event to all interested listeners. |
protected void |
fireItemSetChange()
Sends a simple Item set change event to all interested listeners, indicating that anything in the contents may have changed (items added, removed etc.). |
protected void |
fireItemSetChange(Container.ItemSetChangeEvent event)
Sends an Item set change event to all registered interested listeners. |
protected Collection<Container.ItemSetChangeListener> |
getItemSetChangeListeners()
Returns the item set change listener collection. |
Collection<?> |
getListeners(Class<?> eventType)
|
protected Collection<Container.PropertySetChangeListener> |
getPropertySetChangeListeners()
Returns the property set change listener collection. |
protected void |
removeListener(Container.ItemSetChangeListener listener)
Implementation of the corresponding method in ItemSetChangeNotifier , override with the corresponding public
method and implement the interface to use this. |
protected void |
removeListener(Container.PropertySetChangeListener listener)
Implementation of the corresponding method in PropertySetChangeNotifier , override with the corresponding public
method and implement the interface to use this. |
protected void |
setItemSetChangeListeners(Collection<Container.ItemSetChangeListener> itemSetChangeListeners)
Sets the item set change listener collection. |
protected void |
setPropertySetChangeListeners(Collection<Container.PropertySetChangeListener> propertySetChangeListeners)
Sets the property set change listener collection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.vaadin.data.Container |
---|
addContainerProperty, addItem, addItem, containsId, getContainerProperty, getContainerPropertyIds, getItem, getItemIds, getType, removeAllItems, removeContainerProperty, removeItem, size |
Constructor Detail |
---|
public AbstractContainer()
Method Detail |
---|
protected void addListener(Container.PropertySetChangeListener listener)
PropertySetChangeNotifier
, override with the corresponding public
method and implement the interface to use this.
PropertySetChangeNotifier#addListener(com.vaadin.data.Container.PropertySetChangeListener)
protected void removeListener(Container.PropertySetChangeListener listener)
PropertySetChangeNotifier
, override with the corresponding public
method and implement the interface to use this.
PropertySetChangeNotifier#removeListener(com.vaadin.data.Container.
PropertySetChangeListener)
protected void addListener(Container.ItemSetChangeListener listener)
ItemSetChangeNotifier
, override with the corresponding public
method and implement the interface to use this.
ItemSetChangeNotifier#addListener(com.vaadin.data.Container.ItemSetChangeListener)
protected void removeListener(Container.ItemSetChangeListener listener)
ItemSetChangeNotifier
, override with the corresponding public
method and implement the interface to use this.
ItemSetChangeNotifier#removeListener(com.vaadin.data.Container.ItemSetChangeListener)
protected void fireContainerPropertySetChange()
protected void fireContainerPropertySetChange(Container.PropertySetChangeEvent event)
fireContainerPropertySetChange()
instead of this method
unless additional information about the exact changes is available and
should be included in the event.
event
- the property change event to send, optionally with additional
informationprotected void fireItemSetChange()
protected void fireItemSetChange(Container.ItemSetChangeEvent event)
event
- the item set change event to send, optionally with additional
informationprotected void setPropertySetChangeListeners(Collection<Container.PropertySetChangeListener> propertySetChangeListeners)
propertySetChangeListeners
- protected Collection<Container.PropertySetChangeListener> getPropertySetChangeListeners()
protected void setItemSetChangeListeners(Collection<Container.ItemSetChangeListener> itemSetChangeListeners)
itemSetChangeListeners
- protected Collection<Container.ItemSetChangeListener> getItemSetChangeListeners()
public Collection<?> getListeners(Class<?> eventType)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |