public class DeviceAdaptiveGrid extends com.google.gwt.user.client.ui.Composite implements Pageable, HasDataSource<PagedDataSource<?>>
| Constructor and Description |
|---|
DeviceAdaptiveGrid() |
| Modifier and Type | Method and Description |
|---|---|
com.google.gwt.event.shared.HandlerRegistration |
addRowRenderHandler(RowRenderHandler handler) |
void |
clear() |
com.google.gwt.user.client.ui.Widget |
getActionWidget(String key)
Retrieve the widget associated to the grid component
|
List<DataRow> |
getCurrentPageRows() |
int |
getCurrentPageSize() |
PagedDataSource<?> |
getDataSource() |
ColumnDefinitions |
getGridColumnDefinitionsByDevice() |
int |
getPageCount()
Return the total number of pages
|
DataRow |
getRow(com.google.gwt.user.client.ui.Widget w) |
List<DataRow> |
getSelectedRows() |
void |
goToPage(int page)
Moves the pageable's cursor to an arbitrary page
|
void |
initGrid(DeviceAdaptiveGridColumnDefinitions columnDefinitions,
int pageSize,
RowSelectionModel rowSelection,
int cellSpacing,
boolean autoLoadData,
boolean stretchColumns,
boolean highlightRowOnMouseOver,
String emptyDataFilling,
boolean fixedCellSize,
String defaultSortingColumn,
Grid.SortingType defaultSortingType)
Initialize grid component
|
boolean |
isDataLoaded()
Checks if pageable data is already available
|
void |
loadData() |
void |
nextPage()
Moves the pageable's cursor to the next page
|
void |
previousPage()
Moves the pageable's cursor to the previous page
|
void |
refresh() |
void |
setDataSource(PagedDataSource<?> dataSource) |
void |
setDataSource(PagedDataSource<?> dataSource,
boolean autoLoadData) |
void |
setPager(Pager pager)
Sets the pager for call back
|
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidgetaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEventspublic void setDataSource(PagedDataSource<?> dataSource)
dataSource - The datasource used to fill the gridpublic void setDataSource(PagedDataSource<?> dataSource, boolean autoLoadData)
setDataSource in interface HasDataSource<PagedDataSource<?>>public void loadData()
Grid.loadData()public void clear()
AbstractGrid.clear()public ColumnDefinitions getGridColumnDefinitionsByDevice()
public com.google.gwt.event.shared.HandlerRegistration addRowRenderHandler(RowRenderHandler handler)
handler - Event handlera rowrender event handlerpublic int getCurrentPageSize()
Grid.getCurrentPageSize()public PagedDataSource<?> getDataSource()
getDataSource in interface HasDataSource<PagedDataSource<?>>Grid.getDataSource()public List<DataRow> getCurrentPageRows()
Grid.getCurrentPageRows()public void refresh()
AbstractGrid.refresh()public List<DataRow> getSelectedRows()
Grid.getSelectedRows()public void nextPage()
PageablenextPage in interface PageableGrid.nextPage()public void previousPage()
PageablepreviousPage in interface PageableGrid.previousPage()public void setPager(Pager pager)
PageablesetPager in interface Pageablepager - Grid.setPager(org.cruxframework.crux.widgets.client.paging.Pager)public void goToPage(int page)
PageablegoToPage in interface Pageablepage - The page of the requested indexGrid.goToPage(int)public DataRow getRow(com.google.gwt.user.client.ui.Widget w)
w - Grid.getRow(com.google.gwt.user.client.ui.Widget)public int getPageCount()
PageablegetPageCount in interface PageableGrid.getPageCount()public boolean isDataLoaded()
PageableisDataLoaded in interface PageableGrid.isDataLoaded()public com.google.gwt.user.client.ui.Widget getActionWidget(String key)
id - public void initGrid(DeviceAdaptiveGridColumnDefinitions columnDefinitions, int pageSize, RowSelectionModel rowSelection, int cellSpacing, boolean autoLoadData, boolean stretchColumns, boolean highlightRowOnMouseOver, String emptyDataFilling, boolean fixedCellSize, String defaultSortingColumn, Grid.SortingType defaultSortingType)
columnDefinitions - The definition of grid`s columnspageSize - The maximum size of a pagerowSelection - Row selection modecellSpacing - Space between cellsautoLoadData - Load data automaticallystretchColumns - Stretch columns to content, if neededhighlightRowOnMouseOver - Highlight row when the mouse cursor is over itemptyDataFilling - fixedCellSize - Fix the size of all cellsdefaultSortingColumn - The default column used to sort datadefaultSortingType - Sorting typeCopyright © 2014. All rights reserved.