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 protected
Header()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addColumn(Grid.Column<?,?> column)
protected Grid.HeaderRow
createRow()
Creates and returns a new instance of the row type.Collection<String>
getConsumedEvents()
Returns the events consumed by the headerGrid.HeaderRow
getDefaultRow()
Returns the current default row of this header.void
removeRow(int index)
Removes the row at the given position.protected void
requestSectionRefresh()
Informs the grid that this section should be re-rendered.void
setDefaultRow(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.StaticSection
Removes the row at the given position.- Overrides:
removeRow
in 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.StaticSection
Creates and returns a new instance of the row type.- Specified by:
createRow
in classGrid.StaticSection<Grid.HeaderRow>
- Returns:
- the created row
-
requestSectionRefresh
protected void requestSectionRefresh()
Description copied from class:Grid.StaticSection
Informs 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:
requestSectionRefresh
in 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)
- Overrides:
addColumn
in classGrid.StaticSection<Grid.HeaderRow>
-
-