Class WTableRow
A WTableRow is returned by WTable#getRowAt()
and managing
various properties of a single row in a table (it is however not a widget).
A table row corresponds to the HTML <tr>
tag.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addStyleClass
(String style) elementAt
(int column) Access the row element at the given column.Returns the row height.getId()
Returns the (unique) identifier for this objectint
Returns the row number of this row in the table.Returns the CSS style class for this row.getTable()
Returns the table to which this row belongs.void
hide()
Hides the row.boolean
isHidden()
Returns whether the rows is hidden.void
removeStyleClass
(String style) void
Sets the row height.void
setHidden
(boolean how) Sets whether the row must be hidden.void
Sets the CSS Id.void
setStyleClass
(String style) Sets the CSS style class for this row.void
show()
Shows the row.void
toggleStyleClass
(String style, boolean add) Methods inherited from class eu.webtoolkit.jwt.WObject
getObjectName, remove, setFormData, setObjectName, tr
-
Constructor Details
-
WTableRow
public WTableRow()Creates a new table row.Table rows must be added to a table using
WTable#insertRow()
before you can access contents in it usingelementAt()
.
-
-
Method Details
-
getTable
Returns the table to which this row belongs.- See Also:
-
elementAt
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.The row must be inserted within a table first.
-
getRowNum
public int getRowNum()Returns the row number of this row in the table.Returns -1 if the row is not yet part of a table.
- See Also:
-
setHeight
Sets the row height.The default row height is
WLength.Auto
. -
getHeight
Returns the row height.- See Also:
-
setStyleClass
Sets the CSS style class for this row.The style is inherited by all table cells in this row.
-
getStyleClass
Returns the CSS style class for this row.- See Also:
-
addStyleClass
-
removeStyleClass
-
toggleStyleClass
-
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). -
isHidden
public boolean isHidden()Returns whether the rows is hidden.- See Also:
-
hide
public void hide()Hides the row.- See Also:
-
show
public void show()Shows the row.- See Also:
-
setId
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:
-
getId
Description copied from class:WObject
Returns the (unique) identifier for this objectFor a
WWidget
, this corresponds to the id of the DOM element that represents the widget. This is not entirely unique, since aWCompositeWidget
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 concatenatingWObject.getObjectName()
with a unique number.
-