use of org.eclipse.scout.rt.client.ui.basic.table.columns.INumberColumn in project scout.rt by eclipse.
the class OrganizeColumnsForm method applyViewForConfig.
public void applyViewForConfig(String configName) {
ClientUIPreferences prefs = ClientUIPreferences.getInstance();
if (isCustomizable()) {
byte[] tableCustomizerData = prefs.getTableCustomizerData(m_organizedTable.getTableCustomizer(), configName);
if (tableCustomizerData != null) {
m_organizedTable.getTableCustomizer().removeAllColumns();
m_organizedTable.getTableCustomizer().setSerializedData(tableCustomizerData);
}
if (m_organizedTable.getReloadHandler() != null) {
m_organizedTable.resetColumnConfiguration();
m_organizedTable.getReloadHandler().reload();
}
}
for (IColumn<?> col : m_organizedTable.getColumnSet().getColumns()) {
col.setVisible(prefs.getTableColumnVisible(col, col.isInitialVisible(), configName));
col.setWidth(prefs.getTableColumnWidth(col, col.getInitialWidth(), configName));
col.setVisibleColumnIndexHint(prefs.getTableColumnViewIndex(col, col.getInitialSortIndex(), configName));
if (col instanceof INumberColumn) {
((INumberColumn) col).setBackgroundEffect(prefs.getTableColumnBackgroundEffect(col, ((INumberColumn) col).getInitialBackgroundEffect(), configName));
}
}
}
Aggregations