|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.extjs.gxt.ui.client.event.BaseObservable
com.extjs.gxt.ui.client.store.Store<M>
com.extjs.gxt.ui.client.store.ListStore<M>
public class ListStore<M extends ModelData>
The store class encapsulates a client side cache of ModelData objects
which provide input data for Components such as the ComboBox and
ListView
| Field Summary |
|---|
| Fields inherited from class com.extjs.gxt.ui.client.store.Store |
|---|
Add, BeforeDataChanged, Clear, DataChanged, Filter, Remove, Sort, Update |
| Constructor Summary | |
|---|---|
ListStore()
Creates a new store. |
|
ListStore(ListLoader loader)
Creates a new store. |
|
| Method Summary | |
|---|---|
void |
add(java.util.List<? extends M> models)
Adds the models to the store and fires the Add event. |
void |
add(M model)
Adds the model to the store and fires the Add event. |
M |
getAt(int index)
Get the model at the specified index. |
int |
getCount()
Gets the number of cached records. |
ListLoadConfig |
getLoadConfig()
Returns the store's last processed load config if available. |
ListLoader<? extends ListLoadResult<M>> |
getLoader()
Returns the store's loader |
java.util.List<M> |
getRange(int start,
int end)
Returns a range of models between specified indices. |
Style.SortDir |
getSortDir()
Returns the current sort direction. |
java.lang.String |
getSortField()
Returns the current sort field. |
SortInfo |
getSortState()
Returns the current sort state of this store. |
int |
indexOf(M model)
Returns the index of the model in this store. |
void |
insert(java.util.List<? extends M> models,
int index)
Inserts the models to the store at the given index and fires the Add event. |
void |
insert(M model,
int index)
Inserts the model to the store at the given index and fires the Add event. |
void |
remove(M model)
Remove a item from the store and fires the Remove event. |
void |
setDefaultSort(java.lang.String field,
Style.SortDir dir)
Sets the default sort column and order to be used by the next load operation. |
void |
setSortDir(Style.SortDir dir)
Sets the sort direction. |
void |
setSortField(java.lang.String field)
Sets the sort field. |
void |
sort(java.lang.String field,
Style.SortDir sortDir)
Sorts the store. |
| Methods inherited from class com.extjs.gxt.ui.client.store.Store |
|---|
addFilter, addStoreListener, applyFilters, clearFilters, commitChanges, contains, equals, filter, filter, findModel, findModel, findModel, findModels, getFilters, getKeyProvider, getModelComparer, getModels, getModifiedRecords, getRecord, getStoreSorter, hasRecord, isFiltered, isMonitorChanges, rejectChanges, removeAll, removeFilter, removeStoreListener, setKeyProvider, setModelComparer, setMonitorChanges, setStoreSorter, update |
| 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 |
|---|
public ListStore()
public ListStore(ListLoader loader)
loader - the loader instance| Method Detail |
|---|
public void add(java.util.List<? extends M> models)
models - the models to addpublic void add(M model)
model - the model to addpublic M getAt(int index)
index - the index of the model to find
public int getCount()
public ListLoadConfig getLoadConfig()
public ListLoader<? extends ListLoadResult<M>> getLoader()
public java.util.List<M> getRange(int start,
int end)
start - the starting indexend - the ending index
public Style.SortDir getSortDir()
public java.lang.String getSortField()
public SortInfo getSortState()
public int indexOf(M model)
model - the model
public void insert(java.util.List<? extends M> models,
int index)
models - the models to insertindex - the insert location
public void insert(M model,
int index)
model - the model to insertindex - the insert locationpublic void remove(M model)
model - the model to remove
public void setDefaultSort(java.lang.String field,
Style.SortDir dir)
field - the name of the field to sort bydir - the sort directionpublic void setSortDir(Style.SortDir dir)
dir - the sort directionpublic void setSortField(java.lang.String field)
field - the sort field
public void sort(java.lang.String field,
Style.SortDir sortDir)
field - the field to sort bysortDir - the sort dir
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||