Class HTMLTable.CellFormatter
This class contains methods used to format a table's cells.
Methods
addStyleName(int, int, String) | Adds a style to the specified cell. |
getAttr(int, int, String) | |
getElement(int, int) | Gets the TD element representing the specified cell. |
removeStyleName(int, int, String) | Removes a style from the specified cell. |
setAlignment(int, int, HasHorizontalAlignment.HorizontalAlignmentConstant, HasVerticalAlignment.VerticalAlignmentConstant) | Sets the horizontal and vertical alignment of the specified cell's
contents. |
setAttr(int, int, String, String) | |
setHeight(int, int, String) | Sets the height of the specified cell. |
setHorizontalAlignment(int, int, HasHorizontalAlignment.HorizontalAlignmentConstant) | Sets the horizontal alignment of the specified cell. |
setStyleName(int, int, String) | Sets the style name associated with the specified cell. |
setVerticalAlignment(int, int, HasVerticalAlignment.VerticalAlignmentConstant) | Sets the vertical alignment of the specified cell. |
setWidth(int, int, String) | Sets the width of the specified cell. |
setWordWrap(int, int, boolean) | Sets whether the specified cell will allow word wrapping of its contents. |
Method Detail
addStyleName
public void
addStyleName(
int row, int column, String styleName)
Adds a style to the specified cell.
Parameters
- row
- the cell's row
- column
- the cell's column
- styleName
- the style name to be added
See Also
UIObject.addStyleName(String)
getAttr
Parameters
- row
-
- column
-
- attr
-
getElement
public
Element getElement(
int row, int column)
Gets the TD element representing the specified cell.
Parameters
- row
- the row of the cell to be retrieved
- column
- the column of the cell to be retrieved
Return Value
the column's TD element
removeStyleName
public void
removeStyleName(
int row, int column, String styleName)
Removes a style from the specified cell.
Parameters
- row
- the cell's row
- column
- the cell's column
- styleName
- the style name to be removed
See Also
UIObject.removeStyleName(String)
setAlignment
Sets the horizontal and vertical alignment of the specified cell's
contents.
Parameters
- row
- the row of the cell whose alignment is to be set
- column
- the cell whose alignment is to be set
- hAlign
- the cell's new horizontal alignment as specified in
HasHorizontalAlignment
- vAlign
- the cell's new vertical alignment as specified in
HasVerticalAlignment
setAttr
protected void
setAttr(
int row, int column, String attrName, String value)
Parameters
- row
-
- column
-
- attrName
-
- value
-
setHeight
public void
setHeight(
int row, int column, String height)
Sets the height of the specified cell.
Parameters
- row
- the row of the cell whose height is to be set
- column
- the cell whose height is to be set
- height
- the cell's new height, in CSS units
setHorizontalAlignment
Sets the horizontal alignment of the specified cell.
Parameters
- row
- the row of the cell whose alignment is to be set
- column
- the cell whose alignment is to be set
- align
- the cell's new horizontal alignment as specified in
HasHorizontalAlignment.
setStyleName
public void
setStyleName(
int row, int column, String styleName)
Sets the style name associated with the specified cell.
Parameters
- row
- the row of the cell whose style name is to be set
- column
- the column of the cell whose style name is to be set
- styleName
- the new style name
See Also
UIObject.setStyleName(String)
setVerticalAlignment
Sets the vertical alignment of the specified cell.
Parameters
- row
- the row of the cell whose alignment is to be set
- column
- the cell whose alignment is to be set
- align
- the cell's new vertical alignment as specified in
HasVerticalAlignment.
setWidth
public void
setWidth(
int row, int column, String width)
Sets the width of the specified cell.
Parameters
- row
- the row of the cell whose width is to be set
- column
- the cell whose width is to be set
- width
- the cell's new width, in CSS units
setWordWrap
public void setWordWrap(int row, int column, boolean wrap)
Sets whether the specified cell will allow word wrapping of its contents.
Parameters
- row
- the row of the cell whose word-wrap is to be set
- column
- the cell whose word-wrap is to be set
- wrap
-
false
to disable word wrapping in this cell