use of org.eclipse.scout.rt.client.ui.basic.table.TableRow in project scout.rt by eclipse.
the class AbstractPageWithNodes method rebuildTableInternal.
@Override
public void rebuildTableInternal() {
List<ITreeNode> childNodes = getChildNodes();
try {
getTable().setTableChanging(true);
//
unlinkAllTableRowWithPage();
getTable().discardAllRows();
for (ITreeNode childNode : childNodes) {
ITableRow row = new TableRow(getTable().getColumnSet());
updateCellFromPageCell(row.getCellForUpdate(0), childNode.getCell());
ITableRow insertedRow = getTable().addRow(row);
linkTableRowWithPage(insertedRow, (IPage) childNode);
}
} finally {
getTable().setTableChanging(false);
}
}
use of org.eclipse.scout.rt.client.ui.basic.table.TableRow in project scout.rt by eclipse.
the class OrganizeColumnsForm method createColumnsTableRows.
protected List<ITableRow> createColumnsTableRows(Table columnsTable) {
List<ITableRow> rowList = new ArrayList<ITableRow>();
for (IColumn<?> col : m_organizedTable.getColumnSet().getAllColumnsInUserOrder()) {
if (acceptColumnForColumnsTable(col)) {
IHeaderCell headerCell = col.getHeaderCell();
TableRow row = new TableRow(columnsTable.getColumnSet());
// Key
columnsTable.getKeyColumn().setValue(row, col);
// Column Title
String columnTitle = headerCell.getText();
if (StringUtility.isNullOrEmpty(columnTitle)) {
columnTitle = headerCell.getTooltipText();
row.setFont(FontSpec.parse("ITALIC"));
}
columnsTable.getTitleColumn().setValue(row, columnTitle);
// grouping and sorting
StringBuilder sb = new StringBuilder();
if (col.isSortActive()) {
sb.append(col.isSortAscending() ? "\u2191" : "\u2193");
sb.append(col.getSortIndex() + 1);
}
if (col.isGroupingActive()) {
sb.append(TEXTS.get("GroupingAbbreviation"));
}
columnsTable.getGroupAndSortColumn().setValue(row, sb.toString());
// CustomColumn
if (col instanceof ICustomColumn<?>) {
columnsTable.getCustomColumnColumn().setValue(row, TEXTS.get("CustomColumAbbreviation"));
}
// filter
if (col.isColumnFilterActive()) {
columnsTable.getFilterColumn().setValue(row, TEXTS.get("FilterAbbreviation"));
}
// width
columnsTable.getWidthColumn().setValue(row, col.getWidth());
rowList.add(row);
}
}
return rowList;
}
Aggregations