com.vaadin.client.ui.grid
Class Grid.SelectionColumn

java.lang.Object
  extended by com.vaadin.client.ui.grid.GridColumn<java.lang.Boolean,T>
      extended by com.vaadin.client.ui.grid.Grid.SelectionColumn
Enclosing class:
Grid<T>

public final class Grid.SelectionColumn
extends GridColumn<java.lang.Boolean,T>


Method Summary
 Renderer<? super C> getRenderer()
          The renderer to render the cell width.
 java.lang.Boolean getValue(T row)
          Returns the data that should be rendered into the cell.
 int getWidth()
          Returns the pixel width of the column
 boolean isSortable()
          Are sort indicators shown for the column.
 boolean isVisible()
          Is the column visible.
 void setHeader(java.lang.String caption)
          Sets a header caption for this column.
 void setSortable(boolean sortable)
          Enables sort indicators for the grid.
 void setVisible(boolean visible)
          Sets a column as visible in the grid.
 void setWidth(int pixels)
          Sets the pixel width of the column.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

setVisible

public void setVisible(boolean visible)
Sets a column as visible in the grid.

Parameters:
visible - true if the column should be displayed in the grid

setWidth

public void setWidth(int pixels)
Sets the pixel width of the column. Use a negative value for the grid to autosize column based on content and available space

Parameters:
pixels - the width in pixels or negative for auto sizing

getValue

public java.lang.Boolean getValue(T row)
Returns the data that should be rendered into the cell. By default returning Strings and Widgets are supported. If the return type is a String then it will be treated as preformatted text.

To support other types you will need to pass a custom renderer to the column via the column constructor.

Parameters:
row - The row object that provides the cell content.
Returns:
The cell content

setHeader

public void setHeader(java.lang.String caption)
Sets a header caption for this column.

Parameters:
caption - caption text for header

isVisible

public boolean isVisible()
Is the column visible. By default all columns are visible.

Returns:
true if the column is visible

getRenderer

public Renderer<? super C> getRenderer()
The renderer to render the cell width. By default renders the data as a String or adds the widget into the cell if the column type is of widget type.

Returns:
The renderer to render the cell content with

getWidth

public int getWidth()
Returns the pixel width of the column

Returns:
pixel width of the column

setSortable

public void setSortable(boolean sortable)
Enables sort indicators for the grid.

Note:The API can still sort the column even if this is set to false.

Parameters:
sortable - true when column sort indicators are visible.

isSortable

public boolean isSortable()
Are sort indicators shown for the column.

Returns:
true if the column is sortable

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


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