Package com.vaadin.featurepack.data.util
Class AbstractContainer
java.lang.Object
com.vaadin.featurepack.data.util.AbstractContainer
- All Implemented Interfaces:
Container,Serializable
- Direct Known Subclasses:
AbstractInMemoryContainer
Abstract container class that manages event listeners and sending events to
them (
and
methods to
make them public.
Container.PropertySetChangeNotifier, Container.ItemSetChangeNotifier).
Note that this class provides the internal implementations for both types of
events and notifiers as protected methods, but does not implement the
Container.PropertySetChangeNotifier and Container.ItemSetChangeNotifier
interfaces directly. This way, subclasses can choose not to implement them.
Subclasses implementing those interfaces should also override the
corresponding
invalid reference
#addListener()
invalid reference
#removeListener()
- Since:
- 6.6
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classAneventobject specifying the container whose Item set has changed.protected static classAneventobject specifying the container whose Property set has changed.Nested classes/interfaces inherited from interface com.vaadin.featurepack.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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidImplementation of the corresponding method inContainer.ItemSetChangeNotifier, override with the corresponding public method and implement the interface to use this.protected voidaddListener(Container.ItemSetChangeListener listener) Deprecated.protected voidDeprecated.As of 7.0, replaced byaddPropertySetChangeListener(Container.PropertySetChangeListener)protected voidImplementation of the corresponding method inContainer.PropertySetChangeNotifier, override with the corresponding public method and implement the interface to use this.protected voidSends a simple Property set change event to all interested listeners.protected voidSends a Property set change event to all interested listeners.protected voidSends a simple Item set change event to all interested listeners, indicating that anything in the contents may have changed (items added, removed etc.).protected voidSends an Item set change event to all registered interested listeners.protected Collection<Container.ItemSetChangeListener> Returns the item set change listener collection.Collection<?> getListeners(Class<?> eventType) protected Collection<Container.PropertySetChangeListener> Returns the property set change listener collection.protected voidImplementation of the corresponding method inContainer.ItemSetChangeNotifier, override with the corresponding public method and implement the interface to use this.protected voidDeprecated.As of 7.0, replaced byaddItemSetChangeListener(Container.ItemSetChangeListener)protected voidDeprecated.As of 7.0, replaced byremovePropertySetChangeListener(Container.PropertySetChangeListener)protected voidImplementation of the corresponding method inContainer.PropertySetChangeNotifier, override with the corresponding public method and implement the interface to use this.protected voidsetItemSetChangeListeners(Collection<Container.ItemSetChangeListener> itemSetChangeListeners) Sets the item set change listener collection.protected voidsetPropertySetChangeListeners(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, waitMethods inherited from interface com.vaadin.featurepack.data.Container
addContainerProperty, addItem, addItem, containsId, getContainerProperty, getContainerPropertyIds, getItem, getItemIds, getType, removeAllItems, removeContainerProperty, removeItem, size
-
Constructor Details
-
AbstractContainer
public AbstractContainer()
-
-
Method Details
-
addPropertySetChangeListener
Implementation of the corresponding method inContainer.PropertySetChangeNotifier, override with the corresponding public method and implement the interface to use this.- See Also:
-
addListener
Deprecated.As of 7.0, replaced byaddPropertySetChangeListener(Container.PropertySetChangeListener) -
removePropertySetChangeListener
Implementation of the corresponding method inContainer.PropertySetChangeNotifier, override with the corresponding public method and implement the interface to use this.- See Also:
-
removeListener
Deprecated.As of 7.0, replaced byremovePropertySetChangeListener(Container.PropertySetChangeListener) -
addItemSetChangeListener
Implementation of the corresponding method inContainer.ItemSetChangeNotifier, override with the corresponding public method and implement the interface to use this.- See Also:
-
addListener
Deprecated.As of 7.0, replaced byaddItemSetChangeListener(Container.ItemSetChangeListener) -
removeItemSetChangeListener
Implementation of the corresponding method inContainer.ItemSetChangeNotifier, override with the corresponding public method and implement the interface to use this.- See Also:
-
removeListener
Deprecated.As of 7.0, replaced byaddItemSetChangeListener(Container.ItemSetChangeListener) -
fireContainerPropertySetChange
protected void fireContainerPropertySetChange()Sends a simple Property set change event to all interested listeners. -
fireContainerPropertySetChange
Sends a Property set change event to all interested listeners. UsefireContainerPropertySetChange()instead of this method unless additional information about the exact changes is available and should be included in the event.- Parameters:
event- the property change event to send, optionally with additional information
-
fireItemSetChange
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.). -
fireItemSetChange
Sends an Item set change event to all registered interested listeners.- Parameters:
event- the item set change event to send, optionally with additional information
-
setPropertySetChangeListeners
protected void setPropertySetChangeListeners(Collection<Container.PropertySetChangeListener> propertySetChangeListeners) Sets the property set change listener collection. For internal use only.- Parameters:
propertySetChangeListeners-
-
getPropertySetChangeListeners
Returns the property set change listener collection. For internal use only. -
setItemSetChangeListeners
protected void setItemSetChangeListeners(Collection<Container.ItemSetChangeListener> itemSetChangeListeners) Sets the item set change listener collection. For internal use only.- Parameters:
itemSetChangeListeners-
-
getItemSetChangeListeners
Returns the item set change listener collection. For internal use only. -
getListeners
-
addItemSetChangeListener(Container.ItemSetChangeListener)