|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.ui.components.grid.GridColumn
public class GridColumn
A column in the grid. Can be obtained by calling
Grid.getColumn(Object propertyId).
| Method Summary | ||
|---|---|---|
protected void |
checkColumnIsAttached()
Checks if column is attached and throws an IllegalStateException
if it is not |
|
Converter<?,?> |
getConverter()
Returns the converter instance used by this column. |
|
java.lang.String |
getFooterCaption()
Returns the caption of the footer. |
|
java.lang.String |
getHeaderCaption()
Returns the caption of the header. |
|
Renderer<?> |
getRenderer()
Returns the renderer instance used by this column. |
|
int |
getWidth()
Returns the width (in pixels). |
|
boolean |
isSortable()
Are the sorting controls visible in the column header |
|
boolean |
isVisible()
Is this column visible in the grid. |
|
void |
setConverter(Converter<?,?> converter)
Sets the converter used to convert from the property value type to the renderer presentation type. |
|
void |
setFooterCaption(java.lang.String caption)
Sets the caption of the footer. |
|
void |
setHeaderCaption(java.lang.String caption)
Sets the caption of the header. |
|
void |
setLastFrozenColumn()
Sets this column as the last frozen column in its grid. |
|
void |
setRenderer(Renderer<?> renderer)
Sets the renderer for this column. |
|
|
setRenderer(Renderer<T> renderer,
Converter<? extends T,?> converter)
Sets the renderer for this column and the converter used to convert from the property value type to the renderer presentation type. |
|
void |
setSortable(boolean sortable)
Should sorting controls be available for the column |
|
void |
setVisible(boolean visible)
Set the visibility of this column |
|
void |
setWidth(int pixelWidth)
Sets the width (in pixels). |
|
void |
setWidthUndefined()
Marks the column width as undefined meaning that the grid is free to resize the column based on the cell contents and available space in the grid. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public java.lang.String getHeaderCaption()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - if the column no longer is attached to the grid
public void setHeaderCaption(java.lang.String caption)
throws java.lang.IllegalStateException
caption - the text to show in the caption
java.lang.IllegalStateException - if the column is no longer attached to any grid
public java.lang.String getFooterCaption()
throws java.lang.IllegalStateException
null.
java.lang.IllegalStateException - if the column is no longer attached to any grid
public void setFooterCaption(java.lang.String caption)
throws java.lang.IllegalStateException
caption - the text to show in the caption
java.lang.IllegalStateException - if the column is no longer attached to any grid
public int getWidth()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - if the column is no longer attached to any grid
public void setWidth(int pixelWidth)
throws java.lang.IllegalStateException,
java.lang.IllegalArgumentException
pixelWidth - the new pixel width of the column
java.lang.IllegalStateException - if the column is no longer attached to any grid
java.lang.IllegalArgumentException - thrown if pixel width is less than zeropublic void setWidthUndefined()
public boolean isVisible()
throws java.lang.IllegalStateException
true if the column is visible
java.lang.IllegalStateException - if the column is no longer attached to any grid
public void setVisible(boolean visible)
throws java.lang.IllegalStateException
visible - is the column visible
java.lang.IllegalStateException - if the column is no longer attached to any grid
protected void checkColumnIsAttached()
throws java.lang.IllegalStateException
IllegalStateException
if it is not
java.lang.IllegalStateException - if the column is no longer attached to any gridpublic void setLastFrozenColumn()
java.lang.IllegalArgumentException - if the column is no longer attached to any gridGrid.setLastFrozenColumn(GridColumn)public void setRenderer(Renderer<?> renderer)
If a suitable converter isn't defined explicitly, the session converter factory is used to find a compatible converter.
renderer - the renderer to use
java.lang.IllegalArgumentException - if no compatible converter could be foundVaadinSession.getConverterFactory(),
ConverterUtil.getConverter(Class, Class, VaadinSession),
setConverter(Converter)
public <T> void setRenderer(Renderer<T> renderer,
Converter<? extends T,?> converter)
renderer - the renderer to use, cannot be nullconverter - the converter to use
java.lang.IllegalArgumentException - if the renderer is already associated with a grid column
public void setConverter(Converter<?,?> converter)
throws java.lang.IllegalArgumentException
converter - the converter to use, or null to not use any
converters
java.lang.IllegalArgumentException - if the types are not compatiblepublic Renderer<?> getRenderer()
public Converter<?,?> getConverter()
public void setSortable(boolean sortable)
sortable - true if the sorting controls should be visible.public boolean isSortable()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||