|
|||||||||
| 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.widget.grid.GridView
com.extjs.gxt.ui.client.widget.grid.LiveGridView
public class LiveGridView
LiveGridView for displaying large amount of data. Data is loaded on demand as the user scrolls the grid.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.extjs.gxt.ui.client.widget.grid.GridView |
|---|
GridView.GridViewImages |
| Field Summary | |
|---|---|
protected El |
liveScroller
|
protected ListStore<ModelData> |
liveStore
|
protected int |
liveStoreOffset
|
protected int |
totalCount
|
protected int |
viewIndex
|
| Fields inherited from class com.extjs.gxt.ui.client.widget.grid.GridView |
|---|
activeHdIndex, autoFill, borderWidth, cm, columnListener, deferEmptyText, ds, el, emptyText, enableHdMenu, enableRowBody, focusEl, focusEnabled, footer, forceFit, grid, header, headerColumnIndex, headerDisabled, images, innerHd, lastViewWidth, listener, mainBody, mainHd, mainWrap, overRow, preventScrollToTopOnRefresh, scroller, scrollOffset, selectable, sortState, splitterWidth, templates, userResized, vbar, viewConfig, widgetList |
| Constructor Summary | |
|---|---|
LiveGridView()
|
|
| Method Summary | |
|---|---|
protected void |
afterRender()
|
protected void |
calculateVBar(boolean force)
|
protected GridEvent<?> |
createComponentEvent(com.google.gwt.user.client.Event event)
|
protected void |
doLoad()
|
int |
getCacheSize()
Returns the numbers of rows that should be cached. |
protected int |
getCalculatedRowHeight()
|
protected int |
getLiveScrollerHeight()
|
protected int |
getLiveStoreCalculatedIndex(int index)
|
int |
getLoadDelay()
Returns the amount of time before loading is done. |
double |
getPrefetchFactor()
Returns the prefetchFactor. |
int |
getRowHeight()
Returns the height of one row. |
protected int |
getScrollAdjust()
|
int |
getVisibleRowCount()
|
void |
handleComponentEvent(GridEvent ge)
|
protected void |
initData(ListStore ds,
ColumnModel cm)
Initializes the data. |
protected boolean |
isCached(int index)
|
protected boolean |
isHorizontalScrollBarShowing()
|
protected boolean |
loadLiveStore(int offset)
|
protected void |
notifyShow()
|
protected void |
onRemove(ListStore<ModelData> ds,
ModelData m,
int index,
boolean isUpdate)
|
void |
refresh()
Refreshed the view. |
void |
refresh(boolean headerToo)
Rebuilds the grid using its current configuration and data. |
protected void |
renderUI()
|
protected void |
resize()
|
void |
scrollToTop()
Scrolls the grid to the top. |
void |
setCacheSize(int cacheSize)
Sets the amount of rows that should be cached (default to 200). |
void |
setLoadDelay(int loadDelay)
Sets the amount of time before loading is done (defaults to 200). |
void |
setPrefetchFactor(double prefetchFactor)
Sets the pre-fetch factor (defaults to .2). |
void |
setRowHeight(int rowHeight)
Sets the height of one row (defaults to 20). |
protected boolean |
shouldCache(int index)
|
protected void |
updateAllColumnWidths()
|
protected void |
updateColumnHidden(int index,
boolean hidden)
|
protected void |
updateColumnWidth(int col,
int width)
|
protected void |
updateRows(int newIndex,
boolean reload)
|
| 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 |
|---|
protected El liveScroller
protected ListStore<ModelData> liveStore
protected int liveStoreOffset
protected int totalCount
protected int viewIndex
| Constructor Detail |
|---|
public LiveGridView()
| Method Detail |
|---|
public int getCacheSize()
public int getLoadDelay()
public double getPrefetchFactor()
public int getRowHeight()
public int getVisibleRowCount()
public void handleComponentEvent(GridEvent ge)
handleComponentEvent in class GridViewpublic void refresh()
public void refresh(boolean headerToo)
GridView
refresh in class GridViewheaderToo - true to refresh the headerpublic void scrollToTop()
GridView
scrollToTop in class GridViewpublic void setCacheSize(int cacheSize)
cacheSize - the new cache sizepublic void setLoadDelay(int loadDelay)
loadDelay - the new load delay in millisecondspublic void setPrefetchFactor(double prefetchFactor)
prefetchFactor - the pre-fetch factorpublic void setRowHeight(int rowHeight)
LiveGridView will
only work with fixed row heights with all rows being the same height.
Changing this value will not physically resize the row heights, rather, the
specified height will be used internally for calculations.
rowHeight - the new row height.protected void afterRender()
afterRender in class GridViewprotected void calculateVBar(boolean force)
calculateVBar in class GridViewprotected GridEvent<?> createComponentEvent(com.google.gwt.user.client.Event event)
createComponentEvent in class GridViewprotected void doLoad()
protected int getCalculatedRowHeight()
protected int getLiveScrollerHeight()
protected int getLiveStoreCalculatedIndex(int index)
protected int getScrollAdjust()
getScrollAdjust in class GridView
protected void initData(ListStore ds,
ColumnModel cm)
GridView
initData in class GridViewds - the data storecm - the column modelprotected boolean isCached(int index)
protected boolean isHorizontalScrollBarShowing()
protected boolean loadLiveStore(int offset)
protected void notifyShow()
notifyShow in class GridView
protected void onRemove(ListStore<ModelData> ds,
ModelData m,
int index,
boolean isUpdate)
onRemove in class GridViewprotected void renderUI()
renderUI in class GridViewprotected void resize()
resize in class GridViewprotected boolean shouldCache(int index)
protected void updateAllColumnWidths()
updateAllColumnWidths in class GridView
protected void updateColumnHidden(int index,
boolean hidden)
updateColumnHidden in class GridView
protected void updateColumnWidth(int col,
int width)
updateColumnWidth in class GridView
protected void updateRows(int newIndex,
boolean reload)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||