Errai 3.0.1-SNAPSHOT

org.jboss.errai.databinding.client
Interface BindableListChangeHandler<M>

All Known Implementing Classes:
ListWidget, UnspecificListChangeHandler

public interface BindableListChangeHandler<M>

A change handler for monitoring mutations of bindable lists (see BindableListWrapper).

Author:
Christian Sadilek

Method Summary
 void onItemAdded(List<M> source, M item)
          Called when a single item has been appended to the list.
 void onItemAddedAt(List<M> source, int index, M item)
          Called when a single item has been added to the list at the provided index.
 void onItemChanged(List<M> source, int index, M item)
          Called when a single item has been changed.
 void onItemRemovedAt(List<M> source, int index)
          Called when a single item has been removed from the list at the provided index.
 void onItemsAdded(List<M> source, Collection<? extends M> items)
          Called when multiple items have been appended to the list.
 void onItemsAddedAt(List<M> source, int index, Collection<? extends M> items)
          Called when multiple items have been added to the list starting at the provided index.
 void onItemsCleared(List<M> source)
          Called when all items have been removed from the list.
 void onItemsRemovedAt(List<M> source, List<Integer> indexes)
          Called when multiple items have been removed from the list.
 

Method Detail

onItemAdded

void onItemAdded(List<M> source,
                 M item)
Called when a single item has been appended to the list.

Parameters:
source - a list representing the state before the item was appended (equal to the old value of the list). Never null.
item - the added item. May be null.

onItemAddedAt

void onItemAddedAt(List<M> source,
                   int index,
                   M item)
Called when a single item has been added to the list at the provided index.

Parameters:
source - a list representing the state before the item was added (equal to the old value of the list). Never null.
index - the index at which the item has been added.
item - the added item. May be null.

onItemsAdded

void onItemsAdded(List<M> source,
                  Collection<? extends M> items)
Called when multiple items have been appended to the list.

Parameters:
source - a list representing the state before the items were appended (equal to the old value of the list). Never null.
items - the added items. May contain null elements.

onItemsAddedAt

void onItemsAddedAt(List<M> source,
                    int index,
                    Collection<? extends M> items)
Called when multiple items have been added to the list starting at the provided index.

Parameters:
source - a list representing the state before the items were added (equal to the old value of the list). Never null.
index - the index at which the items have been added.
item - the added items. May contain null elements.

onItemsCleared

void onItemsCleared(List<M> source)
Called when all items have been removed from the list.

Parameters:
source - a list representing the state before all items were removed (equal to the old value of the list). Never null.

onItemRemovedAt

void onItemRemovedAt(List<M> source,
                     int index)
Called when a single item has been removed from the list at the provided index.

Parameters:
source - a list representing the state before the item was removed (equal to the old value of the list). Never null.
index - the index at which the item has been removed.

onItemsRemovedAt

void onItemsRemovedAt(List<M> source,
                      List<Integer> indexes)
Called when multiple items have been removed from the list.

Parameters:
source - a list representing the state before the items were removed (equal to the old value of the list). Never null.
index - the indexes at which items have been removed.

onItemChanged

void onItemChanged(List<M> source,
                   int index,
                   M item)
Called when a single item has been changed.

Parameters:
source - a list representing the state before the item was changed (equal to the old value of the list). Never null.
index - the index of the item that has changed.
item - the new value of the item at the provided index.

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.