com.extjs.gxt.ui.client.widget
Class ListViewSelectionModel<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.ListViewSelectionModel<M>
All Implemented Interfaces:
Listener<ListViewEvent<M>>, Observable, SelectionProvider<M>, StoreSelectionModel<M>, java.util.EventListener

public class ListViewSelectionModel<M extends ModelData>
extends AbstractStoreSelectionModel<M>
implements Listener<ListViewEvent<M>>

ListView selection model.


Field Summary
protected  boolean enableNavKeys
           
protected  KeyNav<ComponentEvent> keyNav
           
protected  ListStore<M> listStore
           
protected  ListView<M> listView
           
 
Fields inherited from class com.extjs.gxt.ui.client.widget.selection.AbstractStoreSelectionModel
lastSelected, locked, selected, selectionMode, store, storeListener
 
Constructor Summary
ListViewSelectionModel()
           
 
Method Summary
 void bindList(ListView<M> listView)
          Binds the list view to the selection model.
 void handleEvent(ListViewEvent<M> e)
          Sent when an event that the listener has registered for occurs.
protected  void handleMouseClick(ListViewEvent<M> e)
           
protected  void handleMouseDown(ListViewEvent<M> e)
           
protected  boolean isInput(com.google.gwt.user.client.Element target)
           
 boolean isVertical()
          Returns true if up and down arrow keys are used for navigation.
protected  void onKeyDown(ComponentEvent e)
           
protected  void onKeyPress(ComponentEvent e)
           
protected  void onKeyUp(ComponentEvent e)
           
protected  void onLastFocusChanged(M oldFocused, M newFocused)
           
protected  void onRowUpdated(ListViewEvent<M> ge)
           
protected  void onSelectChange(M model, boolean select)
           
 void setVertical(boolean isVertical)
          Sets if up and down arrow keys or left and right arrow keys should be used (defaults to true).
 
Methods inherited from class com.extjs.gxt.ui.client.widget.selection.AbstractStoreSelectionModel
addSelectionChangedListener, bind, deselect, deselect, deselect, deselect, deselect, deselectAll, doDeselect, doMultiSelect, doSelect, doSingleSelect, fireSelectionChange, getLastFocused, getSelectedItem, getSelectedItems, getSelection, getSelectionMode, isLocked, isSelected, onAdd, onClear, onRemove, 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

enableNavKeys

protected boolean enableNavKeys

keyNav

protected KeyNav<ComponentEvent> keyNav

listStore

protected ListStore<M extends ModelData> listStore

listView

protected ListView<M extends ModelData> listView
Constructor Detail

ListViewSelectionModel

public ListViewSelectionModel()
Method Detail

bindList

public void bindList(ListView<M> listView)
Binds the list view to the selection model.

Parameters:
listView - the list view

handleEvent

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

Specified by:
handleEvent in interface Listener<ListViewEvent<M extends ModelData>>
Parameters:
e - the event which occurred

isVertical

public boolean isVertical()
Returns true if up and down arrow keys are used for navigation. Else left and right arrow keys are used.

Returns:
the isVertical

setVertical

public void setVertical(boolean isVertical)
Sets if up and down arrow keys or left and right arrow keys should be used (defaults to true).

Parameters:
isVertical - the isVertical to set

handleMouseClick

protected void handleMouseClick(ListViewEvent<M> e)

handleMouseDown

protected void handleMouseDown(ListViewEvent<M> e)

isInput

protected boolean isInput(com.google.gwt.user.client.Element target)

onKeyDown

protected void onKeyDown(ComponentEvent e)

onKeyPress

protected void onKeyPress(ComponentEvent e)

onKeyUp

protected void onKeyUp(ComponentEvent e)

onLastFocusChanged

protected void onLastFocusChanged(M oldFocused,
                                  M newFocused)
Overrides:
onLastFocusChanged in class AbstractStoreSelectionModel<M extends ModelData>

onRowUpdated

protected void onRowUpdated(ListViewEvent<M> ge)

onSelectChange

protected void onSelectChange(M model,
                              boolean select)
Specified by:
onSelectChange in class AbstractStoreSelectionModel<M extends ModelData>