Package com.google.gwt.user.client.ui
Class HTMLTable.ColumnFormatter
java.lang.Object
com.google.gwt.user.client.ui.HTMLTable.ColumnFormatter
- Enclosing class:
HTMLTable
This class contains methods used to format a table's columns. It is limited
by the support cross-browser HTML support for column formatting.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addStyleName
(int col, String styleName) Adds a style to the specified column.getElement
(int column) Get the col element for the column.getStyleName
(int column) Gets the style of the specified column.getStylePrimaryName
(int column) Gets the primary style of the specified column.void
removeStyleName
(int column, String styleName) Removes a style from the specified column.(package private) void
resizeColumnGroup
(int columns, boolean growOnly) Resize the column group element.void
setStyleName
(int column, String styleName) Sets the style name associated with the specified column.void
setStylePrimaryName
(int column, String styleName) Sets the primary style name associated with the specified column.void
Sets the width of the specified column.
-
Field Details
-
columnGroup
-
-
Constructor Details
-
ColumnFormatter
public ColumnFormatter()
-
-
Method Details
-
addStyleName
Adds a style to the specified column.- Parameters:
col
- the col to which the style will be addedstyleName
- the style name to be added- Throws:
IndexOutOfBoundsException
- See Also:
-
getElement
Get the col element for the column.- Parameters:
column
- the column index- Returns:
- the col element
-
getStyleName
Gets the style of the specified column.- Parameters:
column
- the column to be queried- Returns:
- the style name
- Throws:
IndexOutOfBoundsException
- See Also:
-
getStylePrimaryName
Gets the primary style of the specified column.- Parameters:
column
- the column to be queried- Returns:
- the style name
- Throws:
IndexOutOfBoundsException
- See Also:
-
removeStyleName
Removes a style from the specified column.- Parameters:
column
- the column from which the style will be removedstyleName
- the style name to be removed- Throws:
IndexOutOfBoundsException
- See Also:
-
setStyleName
Sets the style name associated with the specified column.- Parameters:
column
- the column whose style name is to be setstyleName
- the new style name- Throws:
IndexOutOfBoundsException
- See Also:
-
setStylePrimaryName
Sets the primary style name associated with the specified column.- Parameters:
column
- the column whose style name is to be setstyleName
- the new style name- Throws:
IndexOutOfBoundsException
- See Also:
-
setWidth
Sets the width of the specified column.- Parameters:
column
- the column of the cell whose width is to be setwidth
- the cell's new width, in percentage or pixel units- Throws:
IndexOutOfBoundsException
-
resizeColumnGroup
void resizeColumnGroup(int columns, boolean growOnly) Resize the column group element.- Parameters:
columns
- the number of columnsgrowOnly
- true to only grow, false to shrink if needed
-