|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.webtoolkit.jwt.WObject
eu.webtoolkit.jwt.WWidget
eu.webtoolkit.jwt.WWebWidget
eu.webtoolkit.jwt.WInteractWidget
eu.webtoolkit.jwt.WTable
public class WTable
A container widget which provides layout of children in a table grid.
A WTable arranges its children in a table.
To insert or access contents, use
getElementAt() to access the
cell at a particular location in the table. The WTable
expands automatically to create the indexed (row, column) as necessary.
It is possible to insert and delete entire rows or columns from the table
using the insertColumn(),
insertRow(),
deleteColumn(), or
deleteRow() methods.
You may indicate a number of rows and columns that act as headers using
setHeaderCount(). Header cells are rendered as <th>
instead of <td> elements. By default, no rows or columns
are configured as headers.
WTable is displayed as a block.
The widget corresponds to the HTML <table> tag and does
not provide styling. It can be styled using inline or external CSS as
appropriate.
WTableCell,
WTableRow,
WTableColumn| Constructor Summary | |
|---|---|
WTable()
Creates an empty table. |
|
WTable(WContainerWidget parent)
Creates an empty table. |
|
| Method Summary | |
|---|---|
void |
clear()
Clears the entire table. |
void |
deleteColumn(int column)
Delete a column and all its contents. |
void |
deleteRow(int row)
Deletes a row and all its contents. |
WTableColumn |
getColumnAt(int column)
Returns the column object for the given column. |
int |
getColumnCount()
Returns the number of columns in the table. |
WTableCell |
getElementAt(int row,
int column)
Accesses the table element at the given row and column. |
int |
getHeaderCount()
Returns the number of header rows or columns. |
int |
getHeaderCount(Orientation orientation)
Returns the number of header rows or columns. |
WTableRow |
getRowAt(int row)
Returns the row object for the given row. |
int |
getRowCount()
Returns the number of rows in the table. |
WTableColumn |
insertColumn(int column)
Inserts an empty column. |
WTableRow |
insertRow(int row)
Inserts an empty row. |
void |
moveColumn(int from,
int to)
Move a table column from its original position to a new position. |
void |
moveRow(int from,
int to)
Move a table row from its original position to a new position. |
void |
remove()
Deletes the table and its entire contents. |
void |
removeCell(int row,
int column)
Deletes the table cell at the given position. |
void |
removeCell(WTableCell item)
Deletes a table cell and its contents. |
void |
setHeaderCount(int count)
Sets the number of header rows or columns. |
void |
setHeaderCount(int count,
Orientation orientation)
Sets the number of header rows or columns. |
| Methods inherited from class eu.webtoolkit.jwt.WInteractWidget |
|---|
clicked, doubleClicked, enterPressed, escapePressed, gestureChanged, gestureEnded, gestureStarted, isEnabled, keyPressed, keyWentDown, keyWentUp, load, mouseDragged, mouseMoved, mouseWentDown, mouseWentOut, mouseWentOver, mouseWentUp, mouseWheel, propagateSetEnabled, setDraggable, setDraggable, setDraggable, setDraggable, touchEnded, touchMoved, touchStarted |
| Methods inherited from class eu.webtoolkit.jwt.WWidget |
|---|
acceptDrops, acceptDrops, addCssRule, addCssRule, addStyleClass, animateHide, animateShow, boxBorder, boxPadding, containsExposed, disable, dropEvent, enable, getDrop, getJsRef, getParent, hide, htmlText, isLayoutSizeAware, layoutSizeChanged, positionAt, positionAt, removeStyleClass, resize, setClearSides, setHeight, setHidden, setLayoutSizeAware, setMargin, setMargin, setMargin, setMargin, setMargin, setOffsets, setOffsets, setOffsets, setOffsets, setOffsets, setToolTip, setVerticalAlignment, setWidth, show, stopAcceptDrops, toggleStyleClass, toggleStyleClass, tr |
| Methods inherited from class eu.webtoolkit.jwt.WObject |
|---|
addChild, getObjectName, setObjectName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WTable(WContainerWidget parent)
public WTable()
Calls this((WContainerWidget)null)
| Method Detail |
|---|
public void remove()
remove in class WInteractWidgetWContainerWidget.removeWidget(WWidget widget)
public WTableCell getElementAt(int row,
int column)
If the row/column is beyond the current table dimensions, then the table is expanded automatically.
public WTableRow getRowAt(int row)
Like with getElementAt()
, the table expands automatically when the row is beyond the current
table dimensions.
getElementAt(int row, int column),
getColumnAt(int column)public WTableColumn getColumnAt(int column)
Like with getElementAt()
, the table expands automatically when the column is beyond the current
table dimensions.
getElementAt(int row, int column),
getRowAt(int row)public void removeCell(WTableCell item)
The table cell at that position is recreated.
public void removeCell(int row,
int column)
removeCell(WTableCell item)public WTableRow insertRow(int row)
public void deleteRow(int row)
Rows below the given row are shifted up.
public WTableColumn insertColumn(int column)
public void deleteColumn(int column)
public void clear()
This method clears the entire table: all cells and their contents are deleted.
public int getRowCount()
public int getColumnCount()
public void setHeaderCount(int count,
Orientation orientation)
The default values are 0.
Note: This must be set before the initial rendering and cannot be changed later.
public final void setHeaderCount(int count)
Calls setHeaderCount(count, Orientation.Horizontal)
public int getHeaderCount(Orientation orientation)
setHeaderCount(int count, Orientation orientation)public final int getHeaderCount()
Returns getHeaderCount(Orientation.Horizontal)
public void moveRow(int from,
int to)
The table expands automatically when the to row is beyond
the current table dimensions.
moveColumn(int from, int to)
public void moveColumn(int from,
int to)
The table expands automatically when the to column is beyond
the current table dimensions.
moveRow(int from, int to)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||