com.extjs.gxt.ui.client.widget.selection
Interface SelectionModel<C extends Container,T extends Component>

Type Parameters:
C - the selection container type
T - the item type
All Known Implementing Classes:
AbstractSelectionModel, DataListSelectionModel, DataView.DataViewSelectionModel, TableSelectionModel, TreeSelectionModel

public interface SelectionModel<C extends Container,T extends Component>

Base interface for selection models. Defines the minimum methods required by a selection model.


Method Summary
 void bind(C container)
          Binds the selection model to the container.
 void deselect(int index)
          Deselects the item at the given index.
 void deselect(int start, int end)
          Deselects the range.
 void deselect(java.util.List<T> items)
          Deselects the items.
 void deselect(T... items)
          Deselects the items.
 void deselect(T item)
          Deselects the item.
 void deselectAll()
          Deselects all selections.
 T getSelectedItem()
          Returns the selected item.
 java.util.List<T> getSelectedItems()
          Returns the selected items.
 boolean isSelected(T item)
          Returns true if the item is selcted.
 void refresh()
          Refreshes the current selections.
 void select(int index)
          Selects the item at the given index.
 void select(int start, int end)
          Selects the range.
 void select(java.util.List<T> items)
          Selects the items.
 void select(T... items)
          Selects the items.
 void select(T item)
          Selects the item.
 void selectAll()
          Selets all items.
 

Method Detail

bind

void bind(C container)
Binds the selection model to the container.

Parameters:
container - the container

deselect

void deselect(int index)
Deselects the item at the given index.

Parameters:
index - the index of the item to be deselected

deselect

void deselect(int start,
              int end)
Deselects the range.

Parameters:
start - the start index
end - the end index

deselect

void deselect(java.util.List<T> items)
Deselects the items.

Parameters:
items - the item

deselect

void deselect(T... items)
Deselects the items.

Parameters:
items - the items to deselect

deselect

void deselect(T item)
Deselects the item.

Parameters:
item - the item to be deselected

deselectAll

void deselectAll()
Deselects all selections.


getSelectedItem

T getSelectedItem()
Returns the selected item.


getSelectedItems

java.util.List<T> getSelectedItems()
Returns the selected items.


isSelected

boolean isSelected(T item)
Returns true if the item is selcted.

Parameters:
item - the item
Returns:
true if selected

refresh

void refresh()
Refreshes the current selections.


select

void select(int index)
Selects the item at the given index.

Parameters:
index - the index of the item to be selected

select

void select(int start,
            int end)
Selects the range.

Parameters:
start - the start index
end - the end index

select

void select(java.util.List<T> items)
Selects the items. Selects the first item for single-select.

Parameters:
items - the items to select

select

void select(T... items)
Selects the items. Selects the first item for single-select.

Parameters:
items - the items

select

void select(T item)
Selects the item.

Parameters:
item - the item

selectAll

void selectAll()
Selets all items.