|
GWT 2.3.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.view.client.SelectionModel.AbstractSelectionModel<T>
com.google.gwt.view.client.SingleSelectionModel<T>
T
- the record data typepublic class SingleSelectionModel<T>
A simple selection model that allows only one object to be selected a a time.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.google.gwt.view.client.SelectionModel |
---|
SelectionModel.AbstractSelectionModel<T> |
Constructor Summary | |
---|---|
SingleSelectionModel()
Constructs a SingleSelectionModel without a key provider. |
|
SingleSelectionModel(ProvidesKey<T> keyProvider)
Constructs a SingleSelectionModel with the given key provider. |
Method Summary | |
---|---|
protected void |
fireSelectionChangeEvent()
Fire a SelectionChangeEvent . |
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 and fire a SelectionChangeEvent if the selection has
changed. |
Methods inherited from class com.google.gwt.view.client.SelectionModel.AbstractSelectionModel |
---|
addSelectionChangeHandler, fireEvent, getKey, getKeyProvider, isEventCancelled, isEventScheduled, scheduleSelectionChangeEvent, setEventCancelled, setEventScheduled |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SingleSelectionModel()
public SingleSelectionModel(ProvidesKey<T> keyProvider)
keyProvider
- an instance of ProvidesKeyMethod Detail |
---|
public T getSelectedObject()
public boolean isSelected(T object)
SelectionModel
object
- the object
public void setSelected(T object, boolean selected)
SelectionModel
SelectionChangeEvent
if the selection has
changed. Subclasses should not fire an event in the case where
selected is true and the object was already selected, or selected
is false and the object was not previously selected.
object
- the object to select or deselectselected
- true to select, false to deselectprotected void fireSelectionChangeEvent()
SelectionModel.AbstractSelectionModel
SelectionChangeEvent
. Multiple firings may be coalesced.
fireSelectionChangeEvent
in class SelectionModel.AbstractSelectionModel<T>
|
GWT 2.3.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |