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 |
|---|---|
void |
addColumnEditorValidator(String key,
ColumnEditorValidator columnEditorValidator)
Add a validator to a editable column
|
com.google.gwt.event.shared.HandlerRegistration |
addRowRenderHandler(RowRenderHandler handler) |
void |
addScrollHandler(com.google.gwt.event.dom.client.ScrollHandler 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() |
String |
getDetailDialogTitle() |
ColumnDefinitions |
getGridColumnDefinitionsByDevice() |
String |
getHeight() |
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
|
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,
boolean keepEditorOnClickDisabledRows)
Initialize grid component
|
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,
boolean keepEditorOnClickDisabledRows,
boolean showEditorButtons) |
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,
boolean keepEditorOnClickDisabledRows,
boolean showEditorButtons,
boolean freezeHeaders) |
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,
boolean keepEditorOnClickDisabledRows,
boolean showEditorButtons,
boolean freezeHeaders,
String detailDialogTitle) |
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 |
setDetailDialogTitle(String detailDialogTitle) |
void |
setHeight(String height) |
void |
setPager(Pager pager)
Sets the pager for call back
|
void |
setWidth(String width) |
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, sinkEvents, unsinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, sinkBitlessEvent, toStringpublic String getDetailDialogTitle()
public void setDetailDialogTitle(String detailDialogTitle)
public String getHeight()
public 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 addColumnEditorValidator(String key, ColumnEditorValidator columnEditorValidator)
key - columnEditorValidator - 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 void addScrollHandler(com.google.gwt.event.dom.client.ScrollHandler handler)
public 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, boolean keepEditorOnClickDisabledRows, boolean showEditorButtons, boolean freezeHeaders, String detailDialogTitle)
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 typepublic 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, boolean keepEditorOnClickDisabledRows)
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 typekeepEditorOnClickDisabledRows - Keep row's editor opened even when clicking on a disabled datarowpublic 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, boolean keepEditorOnClickDisabledRows, boolean showEditorButtons)
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, boolean keepEditorOnClickDisabledRows, boolean showEditorButtons, boolean freezeHeaders)
public void setHeight(String height)
setHeight in class com.google.gwt.user.client.ui.UIObjectpublic void setWidth(String width)
setWidth in class com.google.gwt.user.client.ui.UIObjectCopyright © 2014. All rights reserved.