com.vaadin.client.ui.grid
Class GridHeader.HeaderCell

java.lang.Object
  extended by com.vaadin.client.ui.grid.GridHeader.HeaderCell
Enclosing class:
GridHeader

public class GridHeader.HeaderCell
extends java.lang.Object

A single cell in a grid header row. Has a textual caption.


Constructor Summary
GridHeader.HeaderCell()
           
 
Method Summary
 int getColspan()
          Returns the amount of columns the cell spans.
 java.lang.String getHtml()
          Returns the html inside the cell.
protected  com.vaadin.client.ui.grid.GridStaticSection<?> getSection()
           
 java.lang.String getText()
          Returns the text displayed in this cell.
 com.vaadin.shared.ui.grid.GridStaticCellType getType()
          Returns the type of the cell.
 Widget getWidget()
          Returns the widget in the cell.
 void setColspan(int colspan)
          Sets the amount of columns the cell spans.
 void setHtml(java.lang.String html)
          Sets the content of the cell to the provided html.
protected  void setSection(com.vaadin.client.ui.grid.GridStaticSection<?> section)
           
 void setText(java.lang.String text)
          Sets the text displayed in this cell.
 void setWidget(Widget widget)
          Set widget as the content of the cell.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridHeader.HeaderCell

public GridHeader.HeaderCell()
Method Detail

setText

public void setText(java.lang.String text)
Sets the text displayed in this cell.

Parameters:
text - a plain text caption

getText

public java.lang.String getText()
Returns the text displayed in this cell.

Returns:
the plain text caption

getSection

protected com.vaadin.client.ui.grid.GridStaticSection<?> getSection()

setSection

protected void setSection(com.vaadin.client.ui.grid.GridStaticSection<?> section)

getColspan

public int getColspan()
Returns the amount of columns the cell spans. By default is 1.

Returns:
The amount of columns the cell spans.

setColspan

public void setColspan(int colspan)
Sets the amount of columns the cell spans. Must be more or equal to 1. By default is 1.

Parameters:
colspan - the colspan to set

getHtml

public java.lang.String getHtml()
Returns the html inside the cell.

Returns:
the html content of the cell.
Throws:
java.lang.IllegalStateException - if trying to retrive HTML from a cell with a type other than Type#HTML.

setHtml

public void setHtml(java.lang.String html)
Sets the content of the cell to the provided html. All previous content is discarded and the cell type is set to Type#HTML.

Parameters:
html - The html content of the cell

getWidget

public Widget getWidget()
Returns the widget in the cell.

Returns:
the widget in the cell
Throws:
java.lang.IllegalStateException - if the cell is not Type#WIDGET

setWidget

public void setWidget(Widget widget)
Set widget as the content of the cell. The type of the cell becomes Type#WIDGET. All previous content is discarded.

Parameters:
widget - The widget to add to the cell. Should not be previously attached anywhere (widget.getParent == null).

getType

public com.vaadin.shared.ui.grid.GridStaticCellType getType()
Returns the type of the cell.

Returns:
the type of content the cell contains.


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