public abstract class AbstractContainer extends Object implements Container
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.Modifier and Type | Class and Description |
---|---|
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. |
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 and Description |
---|
AbstractContainer() |
Modifier and Type | Method and Description |
---|---|
protected void |
addItemSetChangeListener(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.ItemSetChangeListener listener)
Deprecated.
As of 7.0, replaced by
addItemSetChangeListener(Container.ItemSetChangeListener) |
protected void |
addListener(Container.PropertySetChangeListener listener)
Deprecated.
As of 7.0, replaced by
addPropertySetChangeListener(Container.PropertySetChangeListener) |
protected void |
addPropertySetChangeListener(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 |
removeItemSetChangeListener(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.ItemSetChangeListener listener)
Deprecated.
As of 7.0, replaced by
addItemSetChangeListener(Container.ItemSetChangeListener) |
protected void |
removeListener(Container.PropertySetChangeListener listener)
Deprecated.
As of 7.0, replaced by
removePropertySetChangeListener(Container.PropertySetChangeListener) |
protected void |
removePropertySetChangeListener(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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addContainerProperty, addItem, addItem, containsId, getContainerProperty, getContainerPropertyIds, getItem, getItemIds, getType, removeAllItems, removeContainerProperty, removeItem, size
protected void addPropertySetChangeListener(Container.PropertySetChangeListener listener)
PropertySetChangeNotifier
, override with the corresponding public
method and implement the interface to use this.PropertySetChangeNotifier#addListener(Container.PropertySetChangeListener)
@Deprecated protected void addListener(Container.PropertySetChangeListener listener)
addPropertySetChangeListener(Container.PropertySetChangeListener)
protected void removePropertySetChangeListener(Container.PropertySetChangeListener listener)
PropertySetChangeNotifier
, override with the corresponding public
method and implement the interface to use this.PropertySetChangeNotifier#removeListener(Container.
PropertySetChangeListener)
@Deprecated protected void removeListener(Container.PropertySetChangeListener listener)
removePropertySetChangeListener(Container.PropertySetChangeListener)
protected void addItemSetChangeListener(Container.ItemSetChangeListener listener)
ItemSetChangeNotifier
, override with the corresponding public
method and implement the interface to use this.ItemSetChangeNotifier#addListener(Container.ItemSetChangeListener)
@Deprecated protected void addListener(Container.ItemSetChangeListener listener)
addItemSetChangeListener(Container.ItemSetChangeListener)
protected void removeItemSetChangeListener(Container.ItemSetChangeListener listener)
ItemSetChangeNotifier
, override with the corresponding public
method and implement the interface to use this.ItemSetChangeNotifier#removeListener(Container.ItemSetChangeListener)
@Deprecated protected void removeListener(Container.ItemSetChangeListener listener)
addItemSetChangeListener(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)
Copyright © 2019 Vaadin Ltd. All rights reserved.