com.extjs.gxt.ui.client.binder
Class DataListBinder<M extends ModelData>

java.lang.Object
  extended by com.extjs.gxt.ui.client.event.BaseObservable
      extended by com.extjs.gxt.ui.client.binder.StoreBinder<ListStore<M>,DataList,M>
          extended by com.extjs.gxt.ui.client.binder.DataListBinder<M>
Type Parameters:
M - the model type
All Implemented Interfaces:
CheckProvider<M>, Observable, SelectionProvider<M>

public class DataListBinder<M extends ModelData>
extends StoreBinder<ListStore<M>,DataList,M>
implements CheckProvider<M>

A StoreBinder implementation for DataList.


Constructor Summary
DataListBinder(DataList list, ListStore store)
          Creates a new data list store binder.
 
Method Summary
 void addCheckListener(CheckChangedListener listener)
          Adds the check change listener.
 Component findItem(M model)
          Returns the matching component for the given model.
 java.util.List<M> getCheckedSelection()
          Returns the current checked selection.
 java.lang.String getDisplayProperty()
          Returns the display property.
 DataList getList()
          Returns the data list.
 ListStore<M> getStore()
          Returns the list store.
 boolean isChecked(M model)
          Returns true if the model is checked.
 void removeCheckListener(CheckChangedListener listener)
          Removes the check change listener.
 void setCheckedSelection(java.util.List<M> selection)
          Sets the current checked selection.
 void setDisplayProperty(java.lang.String displayProperty)
          Sets the display property name used to the item's text.
 
Methods inherited from class com.extjs.gxt.ui.client.binder.StoreBinder
addSelectionChangedListener, getSelection, init, isAutoSelect, isFiltered, isMask, removeSelectionListener, setAutoSelect, setIconProvider, setMask, setSelection, setSelection, setStringProvider, setStyleProvider
 
Methods inherited from class com.extjs.gxt.ui.client.event.BaseObservable
addListener, fireEvent, fireEvent, getFiresEvents, hasListeners, hasListeners, removeAllListeners, removeListener, setFiresEvents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataListBinder

public DataListBinder(DataList list,
                      ListStore store)
Creates a new data list store binder.

Parameters:
list - the data list
store - the list store
Method Detail

addCheckListener

public void addCheckListener(CheckChangedListener listener)
Description copied from interface: CheckProvider
Adds the check change listener.

Specified by:
addCheckListener in interface CheckProvider<M extends ModelData>
Parameters:
listener - the listener to be added

findItem

public Component findItem(M model)
Description copied from class: StoreBinder
Returns the matching component for the given model.

Specified by:
findItem in class StoreBinder<ListStore<M extends ModelData>,DataList,M extends ModelData>
Parameters:
model - the model
Returns:
the component

getCheckedSelection

public java.util.List<M> getCheckedSelection()
Description copied from interface: CheckProvider
Returns the current checked selection.

Specified by:
getCheckedSelection in interface CheckProvider<M extends ModelData>
Returns:
the checked selection

getDisplayProperty

public java.lang.String getDisplayProperty()
Returns the display property.

Returns:
the display property

getList

public DataList getList()
Returns the data list.

Returns:
this list

getStore

public ListStore<M> getStore()
Returns the list store.

Overrides:
getStore in class StoreBinder<ListStore<M extends ModelData>,DataList,M extends ModelData>
Returns:
the store

isChecked

public boolean isChecked(M model)
Description copied from interface: CheckProvider
Returns true if the model is checked.

Specified by:
isChecked in interface CheckProvider<M extends ModelData>
Parameters:
model - the model
Returns:
the check state

removeCheckListener

public void removeCheckListener(CheckChangedListener listener)
Description copied from interface: CheckProvider
Removes the check change listener.

Specified by:
removeCheckListener in interface CheckProvider<M extends ModelData>
Parameters:
listener - the listener to be removed

setCheckedSelection

public void setCheckedSelection(java.util.List<M> selection)
Description copied from interface: CheckProvider
Sets the current checked selection.

Specified by:
setCheckedSelection in interface CheckProvider<M extends ModelData>
Parameters:
selection - the checked selection

setDisplayProperty

public void setDisplayProperty(java.lang.String displayProperty)
Sets the display property name used to the item's text.

Parameters:
displayProperty - the property