public class

HTMLTable.RowFormatter

extends Object
java.lang.Object
   ↳ com.google.gwt.user.client.ui.HTMLTable.RowFormatter

Class Overview

This class contains methods used to format a table's rows.

Summary

Public Constructors
HTMLTable.RowFormatter()
Public Methods
void addStyleName(int row, String styleName)
Adds a style to the specified row.
Element getElement(int row)
Gets the TR element representing the specified row.
String getStyleName(int row)
Gets the style of the specified row.
String getStylePrimaryName(int row)
Gets the primary style of the specified row.
boolean isVisible(int row)
Determines whether or not this row is visible via the display style attribute.
void removeStyleName(int row, String styleName)
Removes a style from the specified row.
void setStyleName(int row, String styleName)
Sets the style name associated with the specified row.
void setStylePrimaryName(int row, String styleName)
Sets the primary style name associated with the specified row.
void setVerticalAlign(int row, HasVerticalAlignment.VerticalAlignmentConstant align)
Sets the vertical alignment of the specified row.
void setVisible(int row, boolean visible)
Sets whether this row is visible.
Protected Methods
Element ensureElement(int row)
Ensure the TR element representing the specified row exists for subclasses that allow dynamic addition of elements.
Element getRow(Element elem, int row)
void setAttr(int row, String attrName, String value)
Convenience methods to set an attribute on a row.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public HTMLTable.RowFormatter ()

Public Methods

public void addStyleName (int row, String styleName)

Adds a style to the specified row.

Parameters
row the row to which the style will be added
styleName the style name to be added

public Element getElement (int row)

Gets the TR element representing the specified row.

Parameters
row the row whose TR element is to be retrieved
Returns
  • the row's TR element

public String getStyleName (int row)

Gets the style of the specified row.

Parameters
row the row to be queried
Returns
  • the style name
See Also

public String getStylePrimaryName (int row)

Gets the primary style of the specified row.

Parameters
row the row to be queried
Returns
  • the style name

public boolean isVisible (int row)

Determines whether or not this row is visible via the display style attribute.

Parameters
row the row whose visibility is to be set
Returns
  • true if the row is visible

public void removeStyleName (int row, String styleName)

Removes a style from the specified row.

Parameters
row the row from which the style will be removed
styleName the style name to be removed

public void setStyleName (int row, String styleName)

Sets the style name associated with the specified row.

Parameters
row the row whose style name is to be set
styleName the new style name

public void setStylePrimaryName (int row, String styleName)

Sets the primary style name associated with the specified row.

Parameters
row the row whose style name is to be set
styleName the new style name

public void setVerticalAlign (int row, HasVerticalAlignment.VerticalAlignmentConstant align)

Sets the vertical alignment of the specified row.

Parameters
row the row whose alignment is to be set
align the row's new vertical alignment as specified in HasVerticalAlignment

public void setVisible (int row, boolean visible)

Sets whether this row is visible.

Parameters
row the row whose visibility is to be set
visible true to show the row, false to hide it

Protected Methods

protected Element ensureElement (int row)

Ensure the TR element representing the specified row exists for subclasses that allow dynamic addition of elements.

Parameters
row the row whose TR element is to be retrieved
Returns
  • the row's TR element

protected Element getRow (Element elem, int row)

protected void setAttr (int row, String attrName, String value)

Convenience methods to set an attribute on a row.

Parameters
row cell's row
attrName attribute to set
value value to set