com.vaadin.client.widgets
Class Grid.Header

java.lang.Object
  extended by com.vaadin.client.widgets.Grid.StaticSection<Grid.HeaderRow>
      extended by com.vaadin.client.widgets.Grid.Header
Enclosing class:
Grid<T>

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
protected Grid.Header()
           
 
Method Summary
protected  void addColumn(Grid.Column<?,?> column)
           
protected  Grid.HeaderRow createRow()
          Creates and returns a new instance of the row type.
 java.util.Collection<java.lang.String> getConsumedEvents()
          Returns the events consumed by the header
 Grid.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Grid.Header

protected Grid.Header()
Method Detail

removeRow

public void removeRow(int index)
Description copied from class: Grid.StaticSection
Removes the row at the given position.

Overrides:
removeRow in class Grid.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:
java.lang.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 class Grid.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 class Grid.StaticSection<Grid.HeaderRow>

getConsumedEvents

public java.util.Collection<java.lang.String> getConsumedEvents()
Returns the events consumed by the header

Returns:
a collection of BrowserEvents

addColumn

protected void addColumn(Grid.Column<?,?> column)
Overrides:
addColumn in class Grid.StaticSection<Grid.HeaderRow>


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