Package com.google.gwt.user.client.ui
Class HTMLTable.RowFormatter
java.lang.Object
com.google.gwt.user.client.ui.HTMLTable.RowFormatter
- Enclosing class:
- HTMLTable
This class contains methods used to format a table's rows.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStyleName(int row, String styleName) Adds a style to the specified row.protected ElementensureElement(int row) Ensure the TR element representing the specified row exists for subclasses that allow dynamic addition of elements.getElement(int row) Gets the TR element representing the specified row.protected Elementprotected ElementDeprecated.getStyleName(int row) Gets the style of the specified row.getStylePrimaryName(int row) Gets the primary style of the specified row.booleanisVisible(int row) Determines whether or not this row is visible via the display style attribute.voidremoveStyleName(int row, String styleName) Removes a style from the specified row.protected voidConvenience methods to set an attribute on a row.voidsetStyleName(int row, String styleName) Sets the style name associated with the specified row.voidsetStylePrimaryName(int row, String styleName) Sets the primary style name associated with the specified row.voidsetVerticalAlign(int row, HasVerticalAlignment.VerticalAlignmentConstant align) Sets the vertical alignment of the specified row.voidsetVisible(int row, boolean visible) Sets whether this row is visible.
-
Constructor Details
-
RowFormatter
public RowFormatter()
-
-
Method Details
-
addStyleName
Adds a style to the specified row.- Parameters:
row- the row to which the style will be addedstyleName- the style name to be added- Throws:
IndexOutOfBoundsException- See Also:
-
getElement
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
- Throws:
IndexOutOfBoundsException
-
getStyleName
Gets the style of the specified row.- Parameters:
row- the row to be queried- Returns:
- the style name
- Throws:
IndexOutOfBoundsException- See Also:
-
getStylePrimaryName
Gets the primary style of the specified row.- Parameters:
row- the row to be queried- Returns:
- the style name
- Throws:
IndexOutOfBoundsException- See Also:
-
isVisible
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:
trueif the row is visible
-
removeStyleName
Removes a style from the specified row.- Parameters:
row- the row 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 row.- Parameters:
row- the row 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 row.- Parameters:
row- the row whose style name is to be setstyleName- the new style name- Throws:
IndexOutOfBoundsException- See Also:
-
setVerticalAlign
Sets the vertical alignment of the specified row.- Parameters:
row- the row whose alignment is to be setalign- the row's new vertical alignment as specified inHasVerticalAlignment- Throws:
IndexOutOfBoundsException
-
setVisible
public void setVisible(int row, boolean visible) Sets whether this row is visible.- Parameters:
row- the row whose visibility is to be setvisible-trueto show the row,falseto hide it
-
ensureElement
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
- Throws:
IndexOutOfBoundsException
-
getRow
-
getRow
Deprecated.Call and overridegetRow(Element, int)instead. -
setAttr
Convenience methods to set an attribute on a row.- Parameters:
row- cell's rowattrName- attribute to setvalue- value to set- Throws:
IndexOutOfBoundsException
-
getRow(Element, int)instead.