use of com.github.bordertech.wcomponents.WDataTable in project wcomponents by BorderTech.
the class TableCellWithActionExample method createTable.
/**
* Creates and configures the table to be used by the example. The table is configured with global rather than user
* data. Although this is not a realistic scenario, it will suffice for this example.
*
* @return a new configured table.
*/
private WDataTable createTable() {
WDataTable table = new WDataTable();
table.addColumn(new WTableColumn("First name", new WTextField()));
table.addColumn(new WTableColumn("Last name", new WTextField()));
table.addColumn(new WTableColumn("DOB", new WDateField()));
table.addColumn(new WTableColumn("Action", new ExampleButton()));
table.setExpandMode(ExpandMode.CLIENT);
table.setDataModel(createTableModel());
return table;
}
use of com.github.bordertech.wcomponents.WDataTable in project wcomponents by BorderTech.
the class TreeTableExample method createTable.
/**
* Creates and configures the table to be used by the example. The table is configured with global rather than user
* data. Although this is not a realistic scenario, it will suffice for this example.
*
* @return a new configured table.
*/
private WDataTable createTable() {
WDataTable tbl = new WDataTable();
tbl.addColumn(new WTableColumn("First name", new WTextField()));
tbl.addColumn(new WTableColumn("Last name", new WTextField()));
tbl.addColumn(new WTableColumn("DOB", new WDateField()));
tbl.setExpandMode(ExpandMode.CLIENT);
TableTreeNode root = createTree();
tbl.setDataModel(new ExampleTreeTableModel(root));
return tbl;
}
use of com.github.bordertech.wcomponents.WDataTable in project wcomponents by BorderTech.
the class DataTableBeanProviderExample method createTable.
/**
* Creates and configures the table to be used by the example. The table is configured with global rather than user
* data. Although this is not a realistic scenario, it will suffice for this example.
*
* @return a new configured table.
*/
private WDataTable createTable() {
WDataTable tbl = new WDataTable();
tbl.addColumn(new WTableColumn("First name", new WText()));
tbl.addColumn(new WTableColumn("Last name", new WText()));
tbl.addColumn(new WTableColumn("DOB", new WText()));
return tbl;
}
use of com.github.bordertech.wcomponents.WDataTable in project wcomponents by BorderTech.
the class DataTableOptionsExample method createExpandedDataTable.
/**
* @return a table that has expanded content.
*/
private WDataTable createExpandedDataTable() {
WDataTable table = new WDataTable();
table.setType(WDataTable.Type.TABLE);
table.addColumn(new WTableColumn("Column1", WText.class));
table.addColumn(new WTableColumn("Column2", WText.class));
table.addColumn(new WTableColumn("Column3", WText.class));
table.setRowsPerPage(DEFAULT_ROWS_PER_PAGE);
table.setSummary("Expanded content table summary");
table.setCaption("Expanded content table caption");
TableTreeNode root = createTree();
table.setDataModel(new ExampleTreeTableModel(root));
return table;
}
use of com.github.bordertech.wcomponents.WDataTable in project wcomponents by BorderTech.
the class DataTableOptionsExample method createHierarchicDataTable.
/**
* @return a hierarchic table
*/
private WDataTable createHierarchicDataTable() {
WDataTable table = new WDataTable();
table.setType(WDataTable.Type.HIERARCHIC);
table.addColumn(new WTableColumn("Column1", WText.class));
table.addColumn(new WTableColumn("Column2", WText.class));
table.addColumn(new WTableColumn("Column3", WText.class));
table.setRowsPerPage(DEFAULT_ROWS_PER_PAGE);
table.setSummary("Hierarchic table summary");
table.setCaption("Hierarchic table caption");
TableTreeNode root = createHierarchicTree();
table.setDataModel(new ExampleTreeTableModel(root));
return table;
}
Aggregations