|
|||||||||
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 |
onColumnWidthChange(int column,
int width)
|
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 |
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 GridView
public void refresh()
public void refresh(boolean headerToo)
GridView
refresh
in class GridView
headerToo
- true to refresh the headerpublic void scrollToTop()
GridView
scrollToTop
in class GridView
public 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 GridView
protected void calculateVBar(boolean force)
calculateVBar
in class GridView
protected GridEvent<?> createComponentEvent(com.google.gwt.user.client.Event event)
createComponentEvent
in class GridView
protected 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 GridView
ds
- 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 onColumnWidthChange(int column, int width)
onColumnWidthChange
in class GridView
protected void onRemove(ListStore<ModelData> ds, ModelData m, int index, boolean isUpdate)
onRemove
in class GridView
protected void renderUI()
renderUI
in class GridView
protected void resize()
resize
in class GridView
protected boolean shouldCache(int index)
protected void updateRows(int newIndex, boolean reload)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |