com.extjs.gxt.ui.client.widget.grid
Class CheckBoxSelectionModel<M extends ModelData>

java.lang.Object
  extended by com.extjs.gxt.ui.client.event.BaseObservable
      extended by com.extjs.gxt.ui.client.widget.selection.AbstractStoreSelectionModel<M>
          extended by com.extjs.gxt.ui.client.widget.grid.GridSelectionModel<M>
              extended by com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel<M>
Type Parameters:
M - the model data type
All Implemented Interfaces:
Listener<BaseEvent>, Observable, SelectionProvider<M>, ComponentPlugin, StoreSelectionModel<M>, java.util.EventListener

public class CheckBoxSelectionModel<M extends ModelData>
extends GridSelectionModel<M>
implements ComponentPlugin

A grid selection model and component plugin. To use, add the column config to the column model using getColumn() and add this object to the grids plugin.

This selection mode defaults to SelectionMode.MULTI and also supports SelectionMode.SIMPLE. With SIMPLE, the control and shift keys do not need to be pressed for multiple selections.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.extjs.gxt.ui.client.widget.grid.GridSelectionModel
GridSelectionModel.Callback, GridSelectionModel.Cell
 
Field Summary
protected  ColumnConfig config
           
protected  java.lang.String headerCheckTitle
           
 
Fields inherited from class com.extjs.gxt.ui.client.widget.grid.GridSelectionModel
enableNavKeys, grid, grouped, groupingView, keyNav, listStore, selectedGroup, selectedHeader
 
Fields inherited from class com.extjs.gxt.ui.client.widget.selection.AbstractStoreSelectionModel
lastSelected, locked, selected, selectionMode, store, storeListener
 
Constructor Summary
CheckBoxSelectionModel()
           
 
Method Summary
 ColumnConfig getColumn()
          Returns the column config.
protected  void handleMouseClick(GridEvent<M> e)
           
protected  void handleMouseDown(GridEvent<M> e)
           
 void init(Component component)
          Initializes the plugin when the component is created.
protected  ColumnConfig newColumnConfig()
           
protected  void onAdd(java.util.List<? extends M> models)
           
protected  void onClear(StoreEvent<M> se)
           
protected  void onHeaderClick(GridEvent<M> e)
           
protected  void onRemove(M model)
           
protected  void onSelectChange(M model, boolean select)
           
 
Methods inherited from class com.extjs.gxt.ui.client.widget.grid.GridSelectionModel
bind, bindGrid, handleColumnHidden, handleEvent, hasNext, hasPrevious, isInput, isMoveEditorOnEnter, isSelectable, onEditorKey, onKeyDown, onKeyLeft, onKeyPress, onKeyRight, onKeyUp, onLastFocusChanged, onRowUpdated, selectNext, selectPrevious, setMoveEditorOnEnter
 
Methods inherited from class com.extjs.gxt.ui.client.widget.selection.AbstractStoreSelectionModel
addSelectionChangedListener, deselect, deselect, deselect, deselect, deselect, deselectAll, doDeselect, doMultiSelect, doSelect, doSingleSelect, fireSelectionChange, getLastFocused, getSelectedItem, getSelectedItems, getSelection, getSelectionMode, isLocked, isSelected, onUpdate, refresh, removeSelectionListener, select, select, select, select, select, selectAll, setLastFocused, setLocked, setSelection, setSelectionMode
 
Methods inherited from class com.extjs.gxt.ui.client.event.BaseObservable
addListener, callListener, fireEvent, fireEvent, getFiresEvents, getListeners, hasActiveEvent, hasListeners, hasListeners, removeAllListeners, removeListener, setFiresEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

config

protected ColumnConfig config

headerCheckTitle

protected java.lang.String headerCheckTitle
Constructor Detail

CheckBoxSelectionModel

public CheckBoxSelectionModel()
Method Detail

getColumn

public ColumnConfig getColumn()
Returns the column config.

Returns:
the column config

init

public void init(Component component)
Description copied from interface: ComponentPlugin
Initializes the plugin when the component is created.

Specified by:
init in interface ComponentPlugin
Parameters:
component - the source component

handleMouseClick

protected void handleMouseClick(GridEvent<M> e)
Overrides:
handleMouseClick in class GridSelectionModel<M extends ModelData>

handleMouseDown

protected void handleMouseDown(GridEvent<M> e)
Overrides:
handleMouseDown in class GridSelectionModel<M extends ModelData>

newColumnConfig

protected ColumnConfig newColumnConfig()

onAdd

protected void onAdd(java.util.List<? extends M> models)
Overrides:
onAdd in class AbstractStoreSelectionModel<M extends ModelData>

onClear

protected void onClear(StoreEvent<M> se)
Overrides:
onClear in class AbstractStoreSelectionModel<M extends ModelData>

onHeaderClick

protected void onHeaderClick(GridEvent<M> e)

onRemove

protected void onRemove(M model)
Overrides:
onRemove in class AbstractStoreSelectionModel<M extends ModelData>

onSelectChange

protected void onSelectChange(M model,
                              boolean select)
Overrides:
onSelectChange in class GridSelectionModel<M extends ModelData>