Package com.vaadin.client.widgets
Class Grid.Header
- java.lang.Object
-
- com.vaadin.client.widgets.Grid.StaticSection<Grid.HeaderRow>
-
- com.vaadin.client.widgets.Grid.Header
-
protected static class Grid.Header extends Grid.StaticSection<Grid.HeaderRow>
Represents the header section of a Grid. A header consists of a single header row containing a header cell for each column. Each cell has a simple textual caption.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.vaadin.client.widgets.Grid.StaticSection
Grid.StaticSection.StaticCell, Grid.StaticSection.StaticRow<CELLTYPE extends Grid.StaticSection.StaticCell>
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedHeader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddColumn(Grid.Column<?,?> column)Adds cells for the given column to all the rows within this section.protected Grid.HeaderRowcreateRow()Creates and returns a new instance of the row type.Collection<String>getConsumedEvents()Returns the events consumed by the header.Grid.HeaderRowgetDefaultRow()Returns the current default row of this header.voidremoveRow(int index)Removes the row at the given position.protected voidrequestSectionRefresh()Informs the grid that this section should be re-rendered.voidsetDefaultRow(Grid.HeaderRow row)Sets the default row of this header.-
Methods inherited from class com.vaadin.client.widgets.Grid.StaticSection
addRowAt, appendRow, getGrid, getRow, getRowCount, getRows, getVisibleRowCount, isVisible, prependRow, removeColumn, removeRow, setGrid, setVisible, updateColSpans
-
-
-
-
Method Detail
-
removeRow
public void removeRow(int index)
Description copied from class:Grid.StaticSectionRemoves the row at the given position.- Overrides:
removeRowin classGrid.StaticSection<Grid.HeaderRow>- Parameters:
index- the position of the row- See Also:
Grid.StaticSection.addRowAt(int),Grid.StaticSection.appendRow(),Grid.StaticSection.prependRow(),Grid.StaticSection.removeRow(StaticRow)
-
setDefaultRow
public void setDefaultRow(Grid.HeaderRow row)
Sets the default row of this header. The default row is a special header row providing a user interface for sorting columns.- Parameters:
row- the new default row, or null for no default row- Throws:
IllegalArgumentException- this header does not contain the row
-
getDefaultRow
public Grid.HeaderRow getDefaultRow()
Returns the current default row of this header. The default row is a special header row providing a user interface for sorting columns.- Returns:
- the default row or null if no default row set
-
createRow
protected Grid.HeaderRow createRow()
Description copied from class:Grid.StaticSectionCreates and returns a new instance of the row type.- Specified by:
createRowin classGrid.StaticSection<Grid.HeaderRow>- Returns:
- the created row
-
requestSectionRefresh
protected void requestSectionRefresh()
Description copied from class:Grid.StaticSectionInforms the grid that this section should be re-rendered.Note that re-render means calling update() on each cell, preAttach()/postAttach()/preDetach()/postDetach() is not called as the cells are not removed from the DOM.
- Specified by:
requestSectionRefreshin classGrid.StaticSection<Grid.HeaderRow>
-
getConsumedEvents
public Collection<String> getConsumedEvents()
Returns the events consumed by the header.- Returns:
- a collection of BrowserEvents
-
addColumn
protected void addColumn(Grid.Column<?,?> column)
Description copied from class:Grid.StaticSectionAdds cells for the given column to all the rows within this section.- Overrides:
addColumnin classGrid.StaticSection<Grid.HeaderRow>- Parameters:
column- the column that requires cells
-
-