Class WTableColumn
A WTableColumn is returned by WTable#getColumnAt()
and
managing various properties of a single column in a table (it is however not a widget).
A table column corresponds to the HTML <col>
tag.
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionelementAt
(int row) Access the column element at the given row.int
Returns the column number of this column in the table.getId()
Returns the (unique) identifier for this objectReturns the CSS style class for this column.getTable()
Returns the table to which this column belongs.getWidth()
Returns the column width.void
Sets the CSS Id.void
setStyleClass
(String style) Sets the CSS style class for this column.void
Sets the column width.Methods inherited from class eu.webtoolkit.jwt.WObject
getObjectName, remove, setFormData, setObjectName, tr
-
Constructor Details
-
WTableColumn
public WTableColumn()Creates a new table column.Table columns must be added to a table using
WTable#insertColumn()
before you can access contents in it usingelementAt()
.
-
-
Method Details
-
getTable
Returns the table to which this column belongs.- See Also:
-
elementAt
Access the column element at the given row.Like
WTable#getElementAt()
, if the row is beyond the current table dimensions, then the table is expanded automatically.The column must be inserted within a table first.
-
getColumnNum
public int getColumnNum()Returns the column number of this column in the table.Returns -1 if the column is not yet part of a table.
- See Also:
-
setWidth
Sets the column width.The default column width is
WLength.Auto
. -
getWidth
Returns the column width.- See Also:
-
setStyleClass
Sets the CSS style class for this column.The style is inherited by all table cells in this column.
-
getStyleClass
Returns the CSS style class for this column.- 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.
-