com.vaadin.client.ui.grid
Class Grid<T>

java.lang.Object
  extended by ResizeComposite
      extended by com.vaadin.client.ui.grid.Grid<T>
Type Parameters:
T - The row type of the grid. The row type is the POJO type from where the data is retrieved into the column cells.
All Implemented Interfaces:
DeferredWorker, HasSelectionChangeHandlers<T>, SubPartAware

public class Grid<T>
extends ResizeComposite
implements HasSelectionChangeHandlers<T>, SubPartAware, DeferredWorker

A data grid view that supports columns and lazy loading of data rows from a data source.

Columns

The GridColumn class defines the renderer used to render a cell in the grid. Implement Grid.AbstractGridColumn.getValue(Object) to retrieve the cell value from the row object and return the cell renderer to render that cell.

GridColumns contain other properties like the width of the column and the visiblity of the column. If you want to change a column's properties after it has been added to the grid you can get a column object for a specific column index using getColumn(int).

TODO Explain about headers/footers once the multiple header/footer api has been implemented

Data sources

TODO Explain about what a data source is and how it should be implemented.

Since:
Author:
Vaadin Ltd

Nested Class Summary
static class Grid.AbstractGridKeyEvent<HANDLER extends AbstractGridKeyEventHandler>
           
protected  class Grid.BodyUpdater
           
 class Grid.SelectionColumn
           
static class Grid.SelectionMode
          Enumeration for easy setting of selection mode.
protected  class Grid.StaticSectionUpdater
           
 
Field Summary
protected  com.vaadin.client.ui.grid.Grid.ActiveCellHandler activeCellHandler
           
 
Constructor Summary
Grid()
          Creates a new instance.
 
Method Summary
 com.google.gwt.event.shared.HandlerRegistration addBodyKeyDownHandler(BodyKeyDownHandler handler)
          Register a BodyKeyDownHandler to this Grid.
 com.google.gwt.event.shared.HandlerRegistration addBodyKeyPressHandler(BodyKeyPressHandler handler)
          Register a BodyKeyPressHandler to this Grid.
 com.google.gwt.event.shared.HandlerRegistration addBodyKeyUpHandler(BodyKeyUpHandler handler)
          Register a BodyKeyUpHandler to this Grid.
 void addColumn(GridColumn<?,T> column)
          Adds a column as the last column in the grid.
 void addColumn(GridColumn<?,T> column, int index)
          Inserts a column into a specific position in the grid.
 void addColumns(GridColumn<?,T>... columns)
          Adds columns as the last columns in the grid.
 com.google.gwt.event.shared.HandlerRegistration addDataAvailableHandler(DataAvailableHandler handler)
          Register a GWT event handler for a data available event.
 com.google.gwt.event.shared.HandlerRegistration addFooterKeyDownHandler(FooterKeyDownHandler handler)
          Register a FooterKeyDownHandler to this Grid.
 com.google.gwt.event.shared.HandlerRegistration addFooterKeyPressHandler(FooterKeyPressHandler handler)
          Register a FooterKeyPressHandler to this Grid.
 com.google.gwt.event.shared.HandlerRegistration addFooterKeyUpHandler(FooterKeyUpHandler handler)
          Register a FooterKeyUpHandler to this Grid.
 com.google.gwt.event.shared.HandlerRegistration addHeaderKeyDownHandler(HeaderKeyDownHandler handler)
          Register a HeaderKeyDownHandler to this Grid.
 com.google.gwt.event.shared.HandlerRegistration addHeaderKeyPressHandler(HeaderKeyPressHandler handler)
          Register a HeaderKeyPressHandler to this Grid.
 com.google.gwt.event.shared.HandlerRegistration addHeaderKeyUpHandler(HeaderKeyUpHandler handler)
          Register a HeaderKeyUpHandler to this Grid.
 com.google.gwt.event.shared.HandlerRegistration addRowVisibilityChangeHandler(RowVisibilityChangeHandler handler)
           
 com.google.gwt.event.shared.HandlerRegistration addScrollHandler(ScrollHandler handler)
          Adds a scroll handler to this grid
 com.google.gwt.event.shared.HandlerRegistration addSelectionChangeHandler(SelectionChangeHandler<T> handler)
           
 com.google.gwt.event.shared.HandlerRegistration addSortHandler(SortEventHandler<T> handler)
          Register a GWT event handler for a sorting event.
protected  EscalatorUpdater createBodyUpdater()
          Creates the escalator updater used to update the body rows in this grid.
protected  EscalatorUpdater createFooterUpdater()
          Creates the escalator updater used to update the footer rows in this grid.
protected  EscalatorUpdater createHeaderUpdater()
          Creates the escalator updater used to update the header rows in this grid.
 boolean deselect(T row)
          Deselect a row using the current selection model.
protected  int findVisibleColumnIndex(GridColumn<?,T> column)
           
 GridColumn<?,T> getColumn(int index)
          Returns a column by its index in the grid.
 int getColumnCount()
          Returns the amount of columns in the grid.
protected  GridColumn<?,T> getColumnFromVisibleIndex(int index)
           
 java.util.List<GridColumn<?,T>> getColumns()
          Returns a list of columns in the grid.
 DataSource<T> getDataSource()
          Gets the for this Grid.
 EditorRow<T> getEditorRow()
           
protected  Escalator getEscalator()
           
 GridFooter getFooter()
          Returns the footer section of this grid.
 GridHeader getHeader()
          Returns the header section of this grid.
 double getHeightByRows()
          Gets the amount of rows in Grid's body that are shown, while getHeightMode() is HeightMode.ROW.
 com.vaadin.shared.ui.grid.HeightMode getHeightMode()
          Returns the current HeightMode the Grid is in.
 GridColumn<?,T> getLastFrozenColumn()
          Gets the rightmost frozen column in the grid.
 double getScrollLeft()
          Gets the horizontal scroll offset
 double getScrollTop()
          Gets the vertical scroll offset
 T getSelectedRow()
          Gets last selected row from the current SelectionModel.
 java.util.Collection<T> getSelectedRows()
          Gets currently selected rows from the current selection model.
 SelectionModel<T> getSelectionModel()
          Gets a reference to the current selection model.
 java.util.List<SortOrder> getSortOrder()
          Get a copy of the current sort order array.
 com.google.gwt.user.client.Element getSubPartElement(java.lang.String subPart)
          Locates an element inside a component using the identifier provided in subPart.
 java.lang.String getSubPartName(com.google.gwt.user.client.Element subElement)
          Provides an identifier that identifies the element within the component.
protected  java.util.List<GridColumn<?,T>> getVisibleColumns()
          Returns a list of columns that are currently visible.
 boolean isSelected(T row)
          Test if a row is selected.
 boolean isWorkPending()
          Checks whether there are operations pending for this widget that must be executed before reaching a steady state.
 void onBrowserEvent(Event event)
           
 void removeColumn(GridColumn<?,T> column)
          Removes a column from the grid.
 void scrollToEnd()
          Scrolls to the end of the very last row.
 void scrollToRow(int rowIndex)
          Scrolls to a certain row, using ScrollDestination.ANY.
 void scrollToRow(int rowIndex, com.vaadin.shared.ui.grid.ScrollDestination destination)
          Scrolls to a certain row, using user-specified scroll destination.
 void scrollToStart()
          Scrolls to the beginning of the very first row.
 boolean select(T row)
          Select a row using the current selection model.
 void setColumnOrder(GridColumn<?,T>... orderedColumns)
          Sets a new column order for the grid.
 void setDataSource(DataSource<T> dataSource)
          Sets the data source used by this grid.
 void setHeight(java.lang.String height)
          
 void setHeightByRows(double rows)
          Sets the number of rows that should be visible in Grid's body, while getHeightMode() is HeightMode.ROW.
 void setHeightMode(com.vaadin.shared.ui.grid.HeightMode heightMode)
          Defines the mode in which the Grid widget's height is calculated.
 void setLastFrozenColumn(GridColumn<?,T> lastFrozenColumn)
          Sets the rightmost frozen column in the grid.
 void setScrollTop(double px)
          Sets the vertical scroll offset.
 void setSelectionMode(Grid.SelectionMode mode)
          Sets current selection mode.
 void setSelectionModel(SelectionModel<T> selectionModel)
          Sets the current selection model.
 void setSortOrder(java.util.List<SortOrder> order)
          Sets the sort order to use.
 void setStylePrimaryName(java.lang.String style)
           
 void setWidth(java.lang.String width)
           
<C> void
sort(GridColumn<C,T> column)
          Sorts the Grid data in ascending order along one column.
<C> void
sort(GridColumn<C,T> column, com.vaadin.shared.ui.grid.SortDirection direction)
          Sorts the Grid data along one column.
 void sort(Sort s)
          Sets the current sort order using the fluid Sort API.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.vaadin.client.ui.grid.selection.HasSelectionChangeHandlers
addSelectionChangeHandler
 

Field Detail

activeCellHandler

protected final com.vaadin.client.ui.grid.Grid.ActiveCellHandler activeCellHandler
Constructor Detail

Grid

public Grid()
Creates a new instance.

Method Detail

setStylePrimaryName

public void setStylePrimaryName(java.lang.String style)

createHeaderUpdater

protected EscalatorUpdater createHeaderUpdater()
Creates the escalator updater used to update the header rows in this grid. The updater is invoked when header rows or columns are added or removed, or the content of existing header cells is changed.

Returns:
the new header updater instance
See Also:
GridHeader, getHeader()

createBodyUpdater

protected EscalatorUpdater createBodyUpdater()
Creates the escalator updater used to update the body rows in this grid. The updater is invoked when body rows or columns are added or removed, the content of body cells is changed, or the body is scrolled to expose previously hidden content.

Returns:
the new body updater instance

createFooterUpdater

protected EscalatorUpdater createFooterUpdater()
Creates the escalator updater used to update the footer rows in this grid. The updater is invoked when header rows or columns are added or removed, or the content of existing header cells is changed.

Returns:
the new footer updater instance
See Also:
GridFooter, getFooter()

addColumns

public void addColumns(GridColumn<?,T>... columns)
Adds columns as the last columns in the grid.

Parameters:
columns - the columns to add

addColumn

public void addColumn(GridColumn<?,T> column)
Adds a column as the last column in the grid.

Parameters:
column - the column to add

addColumn

public void addColumn(GridColumn<?,T> column,
                      int index)
Inserts a column into a specific position in the grid.

Parameters:
index - the index where the column should be inserted into
column - the column to add
Throws:
java.lang.IllegalStateException - if Grid's current selection model renders a selection column, and index is 0.

findVisibleColumnIndex

protected int findVisibleColumnIndex(GridColumn<?,T> column)

getColumnFromVisibleIndex

protected GridColumn<?,T> getColumnFromVisibleIndex(int index)

removeColumn

public void removeColumn(GridColumn<?,T> column)
Removes a column from the grid.

Parameters:
column - the column to remove

getColumnCount

public int getColumnCount()
Returns the amount of columns in the grid.

Returns:
The number of columns in the grid

getColumns

public java.util.List<GridColumn<?,T>> getColumns()
Returns a list of columns in the grid.

Returns:
A unmodifiable list of the columns in the grid

getColumn

public GridColumn<?,T> getColumn(int index)
                          throws java.lang.IllegalArgumentException
Returns a column by its index in the grid.

Parameters:
index - the index of the column
Returns:
The column in the given index
Throws:
java.lang.IllegalArgumentException - if the column index does not exist in the grid

getVisibleColumns

protected java.util.List<GridColumn<?,T>> getVisibleColumns()
Returns a list of columns that are currently visible.

Returns:
a list of columns

getHeader

public GridHeader getHeader()
Returns the header section of this grid. The default header contains a single row displaying the column captions.

Returns:
the header

getFooter

public GridFooter getFooter()
Returns the footer section of this grid. The default footer is empty.

Returns:
the footer

getEditorRow

public EditorRow<T> getEditorRow()

getEscalator

protected Escalator getEscalator()

setHeight

public void setHeight(java.lang.String height)

Note: This method will change the widget's size in the browser only if getHeightMode() returns HeightMode.CSS.

See Also:
setHeightMode(HeightMode)

setWidth

public void setWidth(java.lang.String width)

setDataSource

public void setDataSource(DataSource<T> dataSource)
                   throws java.lang.IllegalArgumentException
Sets the data source used by this grid.

Parameters:
dataSource - the data source to use, not null
Throws:
java.lang.IllegalArgumentException - if dataSource is null

getDataSource

public DataSource<T> getDataSource()
Gets the for this Grid.

Returns:
the data source used by this grid

setLastFrozenColumn

public void setLastFrozenColumn(GridColumn<?,T> lastFrozenColumn)
Sets the rightmost frozen column in the grid.

All columns up to and including the given column will be frozen in place when the grid is scrolled sideways.

Parameters:
lastFrozenColumn - the rightmost column to freeze, or null to not have any columns frozen
Throws:
java.lang.IllegalArgumentException - if lastFrozenColumn is not a column from this grid

getLastFrozenColumn

public GridColumn<?,T> getLastFrozenColumn()
Gets the rightmost frozen column in the grid.

Note: Most usually, this method returns the very value set with setLastFrozenColumn(GridColumn). This value, however, can be reset to null if the column is removed from this grid.

Returns:
the rightmost frozen column in the grid, or null if no columns are frozen.

addRowVisibilityChangeHandler

public com.google.gwt.event.shared.HandlerRegistration addRowVisibilityChangeHandler(RowVisibilityChangeHandler handler)

scrollToRow

public void scrollToRow(int rowIndex)
                 throws java.lang.IllegalArgumentException
Scrolls to a certain row, using ScrollDestination.ANY.

Parameters:
rowIndex - zero-based index of the row to scroll to.
Throws:
java.lang.IllegalArgumentException - if rowIndex is below zero, or above the maximum value supported by the data source.

scrollToRow

public void scrollToRow(int rowIndex,
                        com.vaadin.shared.ui.grid.ScrollDestination destination)
                 throws java.lang.IllegalArgumentException
Scrolls to a certain row, using user-specified scroll destination.

Parameters:
rowIndex - zero-based index of the row to scroll to.
destination - desired destination placement of scrolled-to-row. See ScrollDestination for more information.
Throws:
java.lang.IllegalArgumentException - if rowIndex is below zero, or above the maximum value supported by the data source.

scrollToStart

public void scrollToStart()
Scrolls to the beginning of the very first row.


scrollToEnd

public void scrollToEnd()
Scrolls to the end of the very last row.


setScrollTop

public void setScrollTop(double px)
Sets the vertical scroll offset.

Parameters:
px - the number of pixels this grid should be scrolled down

getScrollTop

public double getScrollTop()
Gets the vertical scroll offset

Returns:
the number of pixels this grid is scrolled down

getScrollLeft

public double getScrollLeft()
Gets the horizontal scroll offset

Returns:
the number of pixels this grid is scrolled to the right

setHeightByRows

public void setHeightByRows(double rows)
                     throws java.lang.IllegalArgumentException
Sets the number of rows that should be visible in Grid's body, while getHeightMode() is HeightMode.ROW.

If Grid is currently not in HeightMode.ROW, the given value is remembered, and applied once the mode is applied.

Parameters:
rows - The height in terms of number of rows displayed in Grid's body. If Grid doesn't contain enough rows, white space is displayed instead.
Throws:
java.lang.IllegalArgumentException - if rows is zero or less
java.lang.IllegalArgumentException - if rows is infinite
java.lang.IllegalArgumentException - if rows is NaN
See Also:
setHeightMode(HeightMode)

getHeightByRows

public double getHeightByRows()
Gets the amount of rows in Grid's body that are shown, while getHeightMode() is HeightMode.ROW.

By default, it is .

Returns:
the amount of rows that should be shown in Grid's body, while in HeightMode.ROW.
See Also:
setHeightByRows(double)

setHeightMode

public void setHeightMode(com.vaadin.shared.ui.grid.HeightMode heightMode)
Defines the mode in which the Grid widget's height is calculated.

If HeightMode.CSS is given, Grid will respect the values given via setHeight(String), and behave as a traditional Widget.

If HeightMode.ROW is given, Grid will make sure that the body will display as many rows as getHeightByRows() defines. Note: If headers/footers are inserted or removed, the widget will resize itself to still display the required amount of rows in its body. It also takes the horizontal scrollbar into account.

Parameters:
heightMode - the mode in to which Grid should be set

getHeightMode

public com.vaadin.shared.ui.grid.HeightMode getHeightMode()
Returns the current HeightMode the Grid is in.

Defaults to HeightMode.CSS.

Returns:
the current HeightMode

onBrowserEvent

public void onBrowserEvent(Event event)

getSubPartElement

public com.google.gwt.user.client.Element getSubPartElement(java.lang.String subPart)
Description copied from interface: SubPartAware
Locates an element inside a component using the identifier provided in subPart. The subPart identifier is component specific and may be any string of characters, numbers, space characters and brackets.

Specified by:
getSubPartElement in interface SubPartAware
Parameters:
subPart - The identifier for the element inside the component
Returns:
The element identified by subPart or null if the element could not be found.

getSubPartName

public java.lang.String getSubPartName(com.google.gwt.user.client.Element subElement)
Description copied from interface: SubPartAware
Provides an identifier that identifies the element within the component. The subElement is a part of the component and must never be null.

Note! getSubPartElement(getSubPartName(element)) == element is not always true. A component can choose to provide a more generic identifier for any given element if the results of all interactions with subElement are the same as interactions with the element identified by the return value. For example a button can return an identifier for the root element even though a DIV inside the button was passed as subElement because interactions with the DIV and the root button element produce the same result.

Specified by:
getSubPartName in interface SubPartAware
Parameters:
subElement - The element the identifier string should uniquely identify
Returns:
An identifier that uniquely identifies subElement or null if no identifier could be provided.

setSelectionModel

public void setSelectionModel(SelectionModel<T> selectionModel)
Sets the current selection model.

This function will call SelectionModel.setGrid(Grid).

Parameters:
selectionModel - a selection model implementation.
Throws:
java.lang.IllegalArgumentException - if selection model argument is null

getSelectionModel

public SelectionModel<T> getSelectionModel()
Gets a reference to the current selection model.

Returns:
the currently used SelectionModel instance.

setSelectionMode

public void setSelectionMode(Grid.SelectionMode mode)
Sets current selection mode.

This is a shorthand method for setSelectionModel(com.vaadin.client.ui.grid.selection.SelectionModel).

Parameters:
mode - a selection mode value
See Also:
SelectionMode}.

isSelected

public boolean isSelected(T row)
Test if a row is selected.

Parameters:
row - a row object
Returns:
true, if the current selection model considers the provided row object selected.

select

public boolean select(T row)
Select a row using the current selection model.

Only selection models implementing SelectionModel.Single and SelectionModel.Multi are supported; for anything else, an exception will be thrown.

Parameters:
row - a row object
Returns:
true iff the current selection changed
Throws:
java.lang.IllegalStateException - if the current selection model is not an instance of SelectionModel.Single or SelectionModel.Multi

deselect

public boolean deselect(T row)
Deselect a row using the current selection model.

Only selection models implementing SelectionModel.Single and SelectionModel.Multi are supported; for anything else, an exception will be thrown.

Parameters:
row - a row object
Returns:
true iff the current selection changed
Throws:
java.lang.IllegalStateException - if the current selection model is not an instance of SelectionModel.Single or SelectionModel.Multi

getSelectedRow

public T getSelectedRow()
Gets last selected row from the current SelectionModel.

Only selection models implementing SelectionModel.Single are valid for this method; for anything else, use the getSelectedRows() method.

Returns:
a selected row reference, or null, if no row is selected
Throws:
java.lang.IllegalStateException - if the current selection model is not an instance of SelectionModel.Single

getSelectedRows

public java.util.Collection<T> getSelectedRows()
Gets currently selected rows from the current selection model.

Returns:
a non-null collection containing all currently selected rows.

addSelectionChangeHandler

public com.google.gwt.event.shared.HandlerRegistration addSelectionChangeHandler(SelectionChangeHandler<T> handler)

sort

public void sort(Sort s)
Sets the current sort order using the fluid Sort API. Read the documentation for Sort for more information.

Parameters:
s - a sort instance

sort

public <C> void sort(GridColumn<C,T> column)
Sorts the Grid data in ascending order along one column.

Parameters:
column - a grid column reference

sort

public <C> void sort(GridColumn<C,T> column,
                     com.vaadin.shared.ui.grid.SortDirection direction)
Sorts the Grid data along one column.

Parameters:
column - a grid column reference
direction - a sort direction value

setSortOrder

public void setSortOrder(java.util.List<SortOrder> order)
Sets the sort order to use. Setting this causes the Grid to re-sort itself.

Parameters:
order - a sort order list. If set to null, the sort order is cleared.

getSortOrder

public java.util.List<SortOrder> getSortOrder()
Get a copy of the current sort order array.

Returns:
a copy of the current sort order array

addSortHandler

public com.google.gwt.event.shared.HandlerRegistration addSortHandler(SortEventHandler<T> handler)
Register a GWT event handler for a sorting event. This handler gets called whenever this Grid needs its data source to provide data sorted in a specific order.

Parameters:
handler - a sort event handler
Returns:
the registration for the event

addDataAvailableHandler

public com.google.gwt.event.shared.HandlerRegistration addDataAvailableHandler(DataAvailableHandler handler)
Register a GWT event handler for a data available event. This handler gets called whenever the DataSource for this Grid has new data available.

This handle will be fired with the current available data after registration is done.

Parameters:
handler - a data available event handler
Returns:
the registartion for the event

addBodyKeyDownHandler

public com.google.gwt.event.shared.HandlerRegistration addBodyKeyDownHandler(BodyKeyDownHandler handler)
Register a BodyKeyDownHandler to this Grid. The event for this handler is fired when a KeyDown event occurs while active cell is in the Body of this Grid.

Parameters:
handler - the key handler to register
Returns:
the registration for the event

addBodyKeyUpHandler

public com.google.gwt.event.shared.HandlerRegistration addBodyKeyUpHandler(BodyKeyUpHandler handler)
Register a BodyKeyUpHandler to this Grid. The event for this handler is fired when a KeyUp event occurs while active cell is in the Body of this Grid.

Parameters:
handler - the key handler to register
Returns:
the registration for the event

addBodyKeyPressHandler

public com.google.gwt.event.shared.HandlerRegistration addBodyKeyPressHandler(BodyKeyPressHandler handler)
Register a BodyKeyPressHandler to this Grid. The event for this handler is fired when a KeyPress event occurs while active cell is in the Body of this Grid.

Parameters:
handler - the key handler to register
Returns:
the registration for the event

addHeaderKeyDownHandler

public com.google.gwt.event.shared.HandlerRegistration addHeaderKeyDownHandler(HeaderKeyDownHandler handler)
Register a HeaderKeyDownHandler to this Grid. The event for this handler is fired when a KeyDown event occurs while active cell is in the Header of this Grid.

Parameters:
handler - the key handler to register
Returns:
the registration for the event

addHeaderKeyUpHandler

public com.google.gwt.event.shared.HandlerRegistration addHeaderKeyUpHandler(HeaderKeyUpHandler handler)
Register a HeaderKeyUpHandler to this Grid. The event for this handler is fired when a KeyUp event occurs while active cell is in the Header of this Grid.

Parameters:
handler - the key handler to register
Returns:
the registration for the event

addHeaderKeyPressHandler

public com.google.gwt.event.shared.HandlerRegistration addHeaderKeyPressHandler(HeaderKeyPressHandler handler)
Register a HeaderKeyPressHandler to this Grid. The event for this handler is fired when a KeyPress event occurs while active cell is in the Header of this Grid.

Parameters:
handler - the key handler to register
Returns:
the registration for the event

addFooterKeyDownHandler

public com.google.gwt.event.shared.HandlerRegistration addFooterKeyDownHandler(FooterKeyDownHandler handler)
Register a FooterKeyDownHandler to this Grid. The event for this handler is fired when a KeyDown event occurs while active cell is in the Footer of this Grid.

Parameters:
handler - the key handler to register
Returns:
the registration for the event

addFooterKeyUpHandler

public com.google.gwt.event.shared.HandlerRegistration addFooterKeyUpHandler(FooterKeyUpHandler handler)
Register a FooterKeyUpHandler to this Grid. The event for this handler is fired when a KeyUp event occurs while active cell is in the Footer of this Grid.

Parameters:
handler - the key handler to register
Returns:
the registration for the event

addFooterKeyPressHandler

public com.google.gwt.event.shared.HandlerRegistration addFooterKeyPressHandler(FooterKeyPressHandler handler)
Register a FooterKeyPressHandler to this Grid. The event for this handler is fired when a KeyPress event occurs while active cell is in the Footer of this Grid.

Parameters:
handler - the key handler to register
Returns:
the registration for the event

addScrollHandler

public com.google.gwt.event.shared.HandlerRegistration addScrollHandler(ScrollHandler handler)
Adds a scroll handler to this grid

Parameters:
handler - the scroll handler to add
Returns:
a handler registration for the registered scroll handler

isWorkPending

public boolean isWorkPending()
Description copied from interface: DeferredWorker
Checks whether there are operations pending for this widget that must be executed before reaching a steady state.

Specified by:
isWorkPending in interface DeferredWorker

setColumnOrder

public void setColumnOrder(GridColumn<?,T>... orderedColumns)
Sets a new column order for the grid. All columns which are not ordered here will remain in the order they were before as the last columns of grid.

Parameters:
orderedColumns - array of columns in wanted order


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.