use of com.extjs.gxt.ui.client.widget.grid.ColumnModel in project activityinfo by bedatadriven.
the class MonthlyGrid method createColumnModel.
private static ColumnModel createColumnModel() {
List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
ColumnConfig indicator = new ColumnConfig("indicatorName", I18N.CONSTANTS.indicators(), ROW_HEADER_WIDTH);
indicator.setSortable(false);
indicator.setMenuDisabled(true);
columns.add(indicator);
for (int i = 0; i != MONTHS_TO_SHOW; ++i) {
NumberField indicatorField = new NumberField();
indicatorField.getPropertyEditor().setFormat(IndicatorNumberFormat.INSTANCE);
ColumnConfig valueColumn = new ColumnConfig("month" + i, "", MONTH_COLUMN_WIDTH);
valueColumn.setNumberFormat(IndicatorNumberFormat.INSTANCE);
valueColumn.setEditor(new CellEditor(indicatorField));
valueColumn.setSortable(false);
valueColumn.setMenuDisabled(true);
columns.add(valueColumn);
}
return new ColumnModel(columns);
}
Aggregations