public interface

SelectionModel

implements HasHandlers ProvidesKey<T>
com.google.gwt.view.client.SelectionModel<T>
Known Indirect Subclasses

Class Overview

A model for selection within a list.

Summary

Nested Classes
class SelectionModel.AbstractSelectionModel<T> A default implementation of SelectionModel that provides listener addition and removal. 
Public Methods
abstract HandlerRegistration addSelectionChangeHandler(SelectionChangeEvent.Handler handler)
Adds a SelectionChangeEvent handler.
abstract boolean isSelected(T object)
Check if an object is selected.
abstract void setSelected(T object, boolean selected)
Set the selected state of an object and fire a SelectionChangeEvent if the selection has changed.
[Expand]
Inherited Methods
From interface com.google.gwt.event.shared.HasHandlers
From interface com.google.gwt.view.client.ProvidesKey

Public Methods

public abstract HandlerRegistration addSelectionChangeHandler (SelectionChangeEvent.Handler handler)

Adds a SelectionChangeEvent handler.

Parameters
handler the handler
Returns
  • the registration for the event

public abstract boolean isSelected (T object)

Check if an object is selected.

Parameters
object the object
Returns
  • true if selected, false if not

public abstract void setSelected (T object, boolean selected)

Set the selected state of an object and fire a 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.

Parameters
object the object to select or deselect
selected true to select, false to deselect