eu.webtoolkit.jwt
Class WTableRow

java.lang.Object
  extended by eu.webtoolkit.jwt.WObject
      extended by eu.webtoolkit.jwt.WTableRow

public class WTableRow
extends WObject

A table row.

A WTableRow is returned by WTable#getRowAt() and managing various properties of a single row in a table (it is however not a widget).

You cannot access table cells through the row. Instead, to access table cells, see WTable#getElementAt().

A table row corresponds to the HTML <tr> tag.

See Also:
WTable, WTableColumn

Method Summary
 WTableCell elementAt(int column)
          Access the row element at the given column.
 WLength getHeight()
          Returns the row height.
 java.lang.String getId()
          Returns the (unique) identifier for this object
 int getRowNum()
          Returns the row number of this row in the table.
 java.lang.String getStyleClass()
          Returns the CSS style class for this row.
 WTable getTable()
          Returns the table to which this row belongs.
 void hide()
          Hides the row.
 boolean isHidden()
          Returns whether the rows is hidden.
 void setHeight(WLength height)
          Sets the row height.
 void setHidden(boolean how)
          Sets whether the row must be hidden.
 void setId(java.lang.String id)
          Sets the CSS Id.
 void setStyleClass(java.lang.String style)
          Sets the CSS style class for this row.
 void show()
          Shows the row.
 
Methods inherited from class eu.webtoolkit.jwt.WObject
addChild, getObjectName, remove, setObjectName, tr
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTable

public WTable getTable()
Returns the table to which this row belongs.

See Also:
WTable.getRowAt(int row)

elementAt

public WTableCell elementAt(int column)
Access the row element at the given column.

Like WTable#getElementAt(), if the column is beyond the current table dimensions, then the table is expanded automatically.


getRowNum

public int getRowNum()
Returns the row number of this row in the table.

See Also:
WTable.getRowAt(int row)

setHeight

public void setHeight(WLength height)
Sets the row height.

The default row height is WLength.Auto.

See Also:
getHeight(), WWidget.resize(WLength width, WLength height)

getHeight

public WLength getHeight()
Returns the row height.

See Also:
setHeight(WLength height)

setStyleClass

public void setStyleClass(java.lang.String style)
Sets the CSS style class for this row.

The style is inherited by all table cells in this row.

See Also:
getStyleClass(), WWidget.setStyleClass(String styleClass)

getStyleClass

public java.lang.String getStyleClass()
Returns the CSS style class for this row.

See Also:
getStyleClass(), WWidget.getStyleClass()

setHidden

public void setHidden(boolean how)
Sets whether the row must be hidden.

Hide or show the row.

The default value is false (row is not hidden).

See Also:
hide(), show()

isHidden

public boolean isHidden()
Returns whether the rows is hidden.

See Also:
setHidden(boolean how)

hide

public void hide()
Hides the row.

See Also:
setHidden(boolean how)

show

public void show()
Shows the row.

See Also:
setHidden(boolean how)

setId

public void setId(java.lang.String id)
Sets the CSS Id.

Sets a custom Id. Note that the Id must be unique across the whole widget tree, can only be set right after construction and cannot be changed.

See Also:
WObject.getId()

getId

public java.lang.String getId()
Description copied from class: WObject
Returns the (unique) identifier for this object

For a WWidget, this corresponds to the id of the DOM element that represents the widget. This is not entirely unique, since a WCompositeWidget shares the same id as its implementation.

By default, the id is auto-generated, unless a custom id is set for a widget using WWidget.setId(String). The auto-generated id is created by concatenating WObject.getObjectName() with a unique number.

Overrides:
getId in class WObject