public class

SingleSelectionMode

extends Object
implements SelectionMode
java.lang.Object
   ↳ com.shinobicontrols.grids.supplement.SingleSelectionMode

Class Overview

Allows for at most one item to be selected in the ShinobiGridView at any one time. Selecting an item will automatically deselect any other item that is currently selected.

It is possible to dynamically change the SelectionMode used by the ShinobiGridView via the setItemSelectionMode(com.shinobicontrols.grids.core.SelectionMode). When this occurs the grid makes no attempt to validate the current selection state of its items and as such means it is possible for multiple items to be selected, yet for the selection mode to be SingleSelectionMode.

In this situation, when selecting an item, all previously selected items will be deselected. When deselecting an item, if by doing this more than one item remains selected then all currently selected items will be deselected.

Summary

Public Constructors
SingleSelectionMode()
Public Methods
void setSelected(int itemPosition, boolean selected, Selector selector)

Sets the selection state of the given item in the ShinobiGridView.

[Expand]
Inherited Methods
From class java.lang.Object
From interface com.shinobicontrols.grids.core.SelectionMode

Public Constructors

public SingleSelectionMode ()

Public Methods

public void setSelected (int itemPosition, boolean selected, Selector selector)

Sets the selection state of the given item in the ShinobiGridView.

Parameters
itemPosition the position of the item in the adapter
selected the intended new selected state of the item
selector the Selector used for selecting, deselecting and obtaining selected items