Google Web Toolkit (Beta)
Search this site:

# Class HTMLTable.ColumnFormatter

public class HTMLTable.ColumnFormatter
extends Object
This class contains methods used to format a table's columns. It is limited by the support cross-browser HTML support for column formatting.

## Fields

columnGroup |

## Methods

addStyleName(int, String) | Adds a style to the specified column.
getStyleName(int) | Gets a style from a specified column.
removeStyleName(int, String) | Removes a style from the specified column.
setStyleName(int, String) | Sets the style name associated with the specified column.
setWidth(int, String) | Sets the width of the specified column.

## Field Detail

### columnGroup

protected Element columnGroup

## Method Detail

### addStyleName

public void addStyleName(int col, String styleName)
Adds a style to the specified column.

#### Parameters

col
  the col to which the style while be added
styleName
  the style name to be added

#### See Also

UIObject.addStyleName(String)

### getStyleName

public String getStyleName(int column)
Gets a style from a specified column.

#### Parameters

column
  the column to which the style while be added

#### Return Value

the style name

#### See Also

UIObject.getStyleName()

### removeStyleName

public void removeStyleName(int column, String styleName)
Removes a style from the specified column.

#### Parameters

column
  the column to which the style while be removed
styleName
  the style name to be removed

#### See Also

UIObject.removeStyleName(String)

### setStyleName

public void setStyleName(int column, String styleName)
Sets the style name associated with the specified column.

#### Parameters

column
  the column whose style name is to be set
styleName
  the new style name

#### See Also

UIObject.setStyleName(String)

### setWidth

public void setWidth(int column, String width)
Sets the width of the specified column.

#### Parameters

column
  the column of the cell whose width is to be set
width
  the cell's new width, in percentage or pixel units