|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.client.ui.grid.GridColumn<C,T>
C - The column typeT - The row typepublic abstract class GridColumn<C,T>
Represents a column in the Grid.
| Constructor Summary | |
|---|---|
GridColumn(Renderer<? super C> renderer)
Constructs a new column with a custom renderer. |
|
| Method Summary | |
|---|---|
Renderer<? super C> |
getRenderer()
The renderer to render the cell width. |
abstract C |
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 |
| Constructor Detail |
|---|
public GridColumn(Renderer<? super C> renderer)
renderer - The renderer to use for rendering the cells| Method Detail |
|---|
public void setHeader(java.lang.String caption)
caption - caption text for headerpublic boolean isVisible()
true if the column is visiblepublic void setVisible(boolean visible)
visible - true if the column should be displayed in the
gridpublic abstract C getValue(T row)
To support other types you will need to pass a custom renderer to the column via the column constructor.
row - The row object that provides the cell content.
public Renderer<? super C> getRenderer()
public void setWidth(int pixels)
pixels - the width in pixels or negative for auto sizingpublic int getWidth()
public void setSortable(boolean sortable)
Note:The API can still sort the column even if this is set to
false.
sortable - true when column sort indicators are visible.public boolean isSortable()
true if the column is sortablepublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||