com.google.gwt.view.client
Class NoSelectionModel<T>

java.lang.Object
  extended by com.google.gwt.view.client.SelectionModel.AbstractSelectionModel<T>
      extended by com.google.gwt.view.client.NoSelectionModel<T>
Type Parameters:
T - the record data type
All Implemented Interfaces:
HasHandlers, ProvidesKey<T>, SelectionModel<T>

public class NoSelectionModel<T>
extends SelectionModel.AbstractSelectionModel<T>

A selection model that does not allow selection, but fires selection change events. Use this model if you want to know when a user selects an item, but do not want the view to update based on the selection.

Note: This class is new and its interface subject to change.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.google.gwt.view.client.SelectionModel
SelectionModel.AbstractSelectionModel<T>, SelectionModel.SelectionChangeEvent, SelectionModel.SelectionChangeHandler
 
Constructor Summary
NoSelectionModel()
           
 
Method Summary
 T getLastSelectedObject()
          Gets the object that was last selected.
 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 com.google.gwt.view.client.SelectionModel.AbstractSelectionModel
addSelectionChangeHandler, fireEvent, getKey, getKeyProvider, setKeyProvider
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoSelectionModel

public NoSelectionModel()
Method Detail

getLastSelectedObject

public T getLastSelectedObject()
Gets the object that was last selected.

Returns:
the last 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 deselect
selected - true to select, false to deselect