use of org.eclipse.scout.rt.client.ui.basic.table.internal.InternalTableRow in project scout.rt by eclipse.
the class AbstractTable method discardDeletedRows.
@Override
public void discardDeletedRows(Collection<? extends ITableRow> deletedRows) {
if (deletedRows != null) {
for (ITableRow row : deletedRows) {
m_deletedRows.remove(new CompositeObject(getRowKeys(row)));
((InternalTableRow) row).setTableInternal(null);
}
}
}
use of org.eclipse.scout.rt.client.ui.basic.table.internal.InternalTableRow in project scout.rt by eclipse.
the class AbstractTable method addCellObserver.
/**
* Add InternalTableRow as an observer to the cell in order to update the row status on changes
*/
private void addCellObserver(List<InternalTableRow> rows) {
for (InternalTableRow row : rows) {
for (int i = 0; i < row.getCellCount(); i++) {
Cell cell = row.getCellForUpdate(i);
cell.setObserver(row);
}
}
}
use of org.eclipse.scout.rt.client.ui.basic.table.internal.InternalTableRow in project scout.rt by eclipse.
the class AbstractTable method processDecorationBuffer.
/**
* Affects columns with lookup calls or code types<br>
* cells that have changed values fetch new texts/decorations from the lookup service in one single batch call lookup
* (performance optimization)
*/
private void processDecorationBuffer() {
/*
* update row decorations
*/
Map<Integer, Set<ITableRow>> changes = m_rowValueChangeBuffer;
m_rowValueChangeBuffer = new HashMap<>();
applyRowValueChanges(changes);
Set<ITableRow> set = m_rowDecorationBuffer;
m_rowDecorationBuffer = new HashSet<ITableRow>();
applyRowDecorations(set);
/*
* check row filters
*/
if (m_rowFilters.size() > 0) {
boolean filterChanged = false;
for (ITableRow row : set) {
if (row.getTable() == AbstractTable.this && row instanceof InternalTableRow) {
InternalTableRow irow = (InternalTableRow) row;
boolean oldFlag = irow.isFilterAccepted();
applyRowFiltersInternal(irow);
boolean newFlag = irow.isFilterAccepted();
filterChanged = filterChanged || (oldFlag != newFlag);
}
}
if (filterChanged) {
fireRowFilterChanged();
}
}
}
Aggregations