com.extjs.gxt.ui.client.widget.grid
Class GridSelectionModel<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>
All Implemented Interfaces:
Listener<BaseEvent>, Observable, SelectionProvider<M>, StoreSelectionModel<M>, java.util.EventListener
Direct Known Subclasses:
CellSelectionModel, CheckBoxSelectionModel, TreeGridSelectionModel

public class GridSelectionModel<M extends ModelData>
extends AbstractStoreSelectionModel<M>
implements Listener<BaseEvent>

Grid selection model.

Inherited Events:
AbstractStoreSelectionModel BeforeSelect
AbstractStoreSelectionModel SelectionChange


Nested Class Summary
static class GridSelectionModel.Callback
           
static class GridSelectionModel.Cell
           
 
Constructor Summary
GridSelectionModel()
           
 
Method Summary
 void bindGrid(Grid grid)
           
 void handleEvent(BaseEvent e)
          Sent when an event that the listener has registered for occurs.
 boolean isLocked()
          Returns true if the selection model is locked.
 boolean isMoveEditorOnEnter()
          Returns true of the editor moves on enter.
 void onEditorKey(DomEvent e)
           
 void selectNext(boolean keepexisting)
          Selects the next row.
 void selectPrevious(boolean keepexisting)
          Selects the previous row.
 void setMoveEditorOnEnter(boolean moveEditorOnEnter)
          Set this to true to move the editor to the next editable cell on pressing enter.
 
Methods inherited from class com.extjs.gxt.ui.client.widget.selection.AbstractStoreSelectionModel
addSelectionChangedListener, bind, deselect, deselect, deselect, deselect, deselect, deselectAll, getSelectedItem, getSelectedItems, getSelection, getSelectionMode, isSelected, refresh, removeSelectionListener, select, select, select, select, select, selectAll, setLocked, setSelection, setSelectionMode
 
Methods inherited from class com.extjs.gxt.ui.client.event.BaseObservable
addListener, fireEvent, fireEvent, getFiresEvents, getListeners, hasActiveEvent, hasListeners, hasListeners, removeAllListeners, removeListener, setFiresEvents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridSelectionModel

public GridSelectionModel()
Method Detail

bindGrid

public void bindGrid(Grid grid)

handleEvent

public void handleEvent(BaseEvent e)
Description copied from interface: Listener
Sent when an event that the listener has registered for occurs.

Specified by:
handleEvent in interface Listener<BaseEvent>
Parameters:
e - the event which occurred

isLocked

public boolean isLocked()
Description copied from class: AbstractStoreSelectionModel
Returns true if the selection model is locked.

Overrides:
isLocked in class AbstractStoreSelectionModel<M extends ModelData>
Returns:
the locked state

isMoveEditorOnEnter

public boolean isMoveEditorOnEnter()
Returns true of the editor moves on enter.

Returns:
true if editor moves on enter

onEditorKey

public void onEditorKey(DomEvent e)

selectNext

public void selectNext(boolean keepexisting)
Selects the next row.

Parameters:
keepexisting - true to keep existing selections

selectPrevious

public void selectPrevious(boolean keepexisting)
Selects the previous row.

Parameters:
keepexisting - true to keep existing selections

setMoveEditorOnEnter

public void setMoveEditorOnEnter(boolean moveEditorOnEnter)
Set this to true to move the editor to the next editable cell on pressing enter.

Parameters:
moveEditorOnEnter - true to move the editor on pressing enter.