com.google.gwt.view.client
Class SingleSelectionModel<T>
java.lang.Object
com.google.gwt.view.client.SelectionModel.AbstractSelectionModel<T>
com.google.gwt.view.client.SingleSelectionModel<T>
- Type Parameters:
T - the record data type
- All Implemented Interfaces:
- HasHandlers, ProvidesKey<T>, SelectionModel<T>
public class SingleSelectionModel<T>
- extends SelectionModel.AbstractSelectionModel<T>
A simple selection model that allows only one object to be selected a a time.
Note: This class is new and its interface subject to change.
|
Method Summary |
T |
getSelectedObject()
Gets the currently-selected object. |
boolean |
isSelected(T object)
Check if an object is selected. |
void |
setSelected(T object,
boolean selected)
Set the selected state of an object. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SingleSelectionModel
public SingleSelectionModel()
getSelectedObject
public T getSelectedObject()
- Gets the currently-selected object.
isSelected
public boolean isSelected(T object)
- Description copied from interface:
SelectionModel
- Check if an object is selected.
- Parameters:
object - the object
- Returns:
- true if selected, false if not
setSelected
public void setSelected(T object,
boolean selected)
- Description copied from interface:
SelectionModel
- Set the selected state of an object.
- Parameters:
object - the object to select or deselectselected - true to select, false to deselect