Search in sources :

Example 76 with WTableColumn

use of com.github.bordertech.wcomponents.WTableColumn in project wcomponents by BorderTech.

the class WTableOptionsExample method addColumns.

/**
 * @param table the table to add columns
 */
private void addColumns(final WTable table) {
    // Column - First name
    WTextField textField = new WTextField();
    textField.setToolTip("First name");
    table.addColumn(new WTableColumn("First name", textField, new WText("Footer 1")));
    // Column - Last name
    textField = new WTextField();
    textField.setToolTip("Last name");
    table.addColumn(new WTableColumn("Last name", textField, new WText("Footer 2")));
    // Column - Date field
    WDateField dateField = new WDateField();
    dateField.setToolTip("Date of birth");
    table.addColumn(new WTableColumn("Date of birth", dateField, new WText("Footer 3")));
}
Also used : WTableColumn(com.github.bordertech.wcomponents.WTableColumn) WText(com.github.bordertech.wcomponents.WText) WDateField(com.github.bordertech.wcomponents.WDateField) WTextField(com.github.bordertech.wcomponents.WTextField)

Aggregations

WTableColumn (com.github.bordertech.wcomponents.WTableColumn)76 WTextField (com.github.bordertech.wcomponents.WTextField)62 Test (org.junit.Test)57 WDataTable (com.github.bordertech.wcomponents.WDataTable)38 WTable (com.github.bordertech.wcomponents.WTable)32 TableModel (com.github.bordertech.wcomponents.WTable.TableModel)27 AdapterBasicTableModel (com.github.bordertech.wcomponents.AdapterBasicTableModel)24 SimpleTableModel (com.github.bordertech.wcomponents.SimpleTableModel)24 TableDataModel (com.github.bordertech.wcomponents.TableDataModel)24 SimpleTableDataModel (com.github.bordertech.wcomponents.SimpleTableDataModel)23 WText (com.github.bordertech.wcomponents.WText)11 WButton (com.github.bordertech.wcomponents.WButton)8 WDateField (com.github.bordertech.wcomponents.WDateField)7 TableTreeNode (com.github.bordertech.wcomponents.TableTreeNode)5 XmlStringBuilder (com.github.bordertech.wcomponents.XmlStringBuilder)5 ActionConstraint (com.github.bordertech.wcomponents.WDataTable.ActionConstraint)4 ActionConstraint (com.github.bordertech.wcomponents.WTable.ActionConstraint)4 UIContext (com.github.bordertech.wcomponents.UIContext)3 TreeTableDataModel (com.github.bordertech.wcomponents.TreeTableDataModel)2 MockRequest (com.github.bordertech.wcomponents.util.mock.MockRequest)2