Class WTableRow
- java.lang.Object
-
- eu.webtoolkit.jwt.WObject
-
- 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).A table row corresponds to the HTML
<tr>tag.- See Also:
WTable,WTableColumn
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData
-
-
Constructor Summary
Constructors Constructor Description WTableRow()Creates a new table row.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddStyleClass(java.lang.String style)WTableCellelementAt(int column)Access the row element at the given column.WLengthgetHeight()Returns the row height.java.lang.StringgetId()Returns the (unique) identifier for this objectintgetRowNum()Returns the row number of this row in the table.java.lang.StringgetStyleClass()Returns the CSS style class for this row.WTablegetTable()Returns the table to which this row belongs.voidhide()Hides the row.booleanisHidden()Returns whether the rows is hidden.voidremoveStyleClass(java.lang.String style)voidsetHeight(WLength height)Sets the row height.voidsetHidden(boolean how)Sets whether the row must be hidden.voidsetId(java.lang.String id)Sets the CSS Id.voidsetObjectName(java.lang.String name)Sets an object name.voidsetStyleClass(java.lang.String style)Sets the CSS style class for this row.voidshow()Shows the row.voidtoggleStyleClass(java.lang.String style, boolean add)-
Methods inherited from class eu.webtoolkit.jwt.WObject
getObjectName, remove, setFormData, tr
-
-
-
-
Constructor Detail
-
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 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.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:
WTable.getRowAt(int row)
-
setHeight
public void setHeight(WLength height)
Sets the row height.The default row height is
WLength.Auto.
-
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.
-
getStyleClass
public java.lang.String getStyleClass()
Returns the CSS style class for this row.- See Also:
getStyleClass(),WWidget.getStyleClass()
-
addStyleClass
public void addStyleClass(java.lang.String style)
-
removeStyleClass
public void removeStyleClass(java.lang.String style)
-
toggleStyleClass
public void toggleStyleClass(java.lang.String style, boolean add)
-
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:
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:WObjectReturns 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 aWCompositeWidgetshares 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.
-
setObjectName
public void setObjectName(java.lang.String name)
Description copied from class:WObjectSets an object name.The object name can be used to easily identify a type of object in the DOM, and does not need to be unique. It will usually reflect the widget type or role. The object name is prepended to the auto-generated object
WObject.getId().The default object name is empty.
- Overrides:
setObjectNamein classWObject- Parameters:
name- the object name.
-
-