eu.webtoolkit.jwt
Class WTableColumn

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

public class WTableColumn
extends WObject

A table column.

A WTableColumn is returned by WTable#getColumnAt() and managing various properties of a single column in a table (it is however not a widget).

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

A table column corresponds to the HTML <col> tag.

See Also:
WTable, WTableRow

Method Summary
 WTableCell elementAt(int row)
          Access the column element at the given row.
 int getColumnNum()
          Returns the column number of this column in the table.
 java.lang.String getId()
          Returns the (unique) identifier for this object
 java.lang.String getStyleClass()
          Returns the CSS style class for this column.
 WTable getTable()
          Returns the table to which this column belongs.
 WLength getWidth()
          Returns the column width.
 void setId(java.lang.String id)
          Sets the CSS Id.
 void setStyleClass(java.lang.String style)
          Sets the CSS style class for this column.
 void setWidth(WLength width)
          Sets the column width.
 
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 column belongs.

See Also:
WTable.getRowAt(int row)

elementAt

public WTableCell elementAt(int row)
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.


getColumnNum

public int getColumnNum()
Returns the column number of this column in the table.

See Also:
WTable.getRowAt(int row)

setWidth

public void setWidth(WLength width)
Sets the column width.

The default column width is WLength.Auto.

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

getWidth

public WLength getWidth()
Returns the column width.

See Also:
setWidth(WLength width)

setStyleClass

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

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

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

getStyleClass

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

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

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