use of com.extjs.gxt.ui.client.widget.grid.CheckColumnConfig in project activityinfo by bedatadriven.
the class ShareReportDialog method createColumnModel.
private ColumnModel createColumnModel() {
ColumnConfig icon = new ColumnConfig("icon", "", 26);
icon.setSortable(false);
icon.setResizable(false);
icon.setMenuDisabled(true);
icon.setRenderer(new GridCellRenderer<ReportVisibilityDTO>() {
@Override
public Object render(ReportVisibilityDTO model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<ReportVisibilityDTO> store, Grid<ReportVisibilityDTO> grid) {
return IconImageBundle.ICONS.group().getHTML();
}
});
ColumnConfig name = new ColumnConfig("databaseName", I18N.CONSTANTS.group(), 150);
name.setRenderer(new GridCellRenderer<ReportVisibilityDTO>() {
@Override
public Object render(ReportVisibilityDTO model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<ReportVisibilityDTO> store, Grid<ReportVisibilityDTO> grid) {
return model.getDatabaseName() + " Users";
}
});
visibleColumn = new CheckColumnConfig("visible", I18N.CONSTANTS.shared(), 75);
visibleColumn.setDataIndex("visible");
dashboardColumn = new CheckColumnConfig("defaultDashboard", I18N.CONSTANTS.defaultDashboard(), 75);
dashboardColumn.setDataIndex("defaultDashboard");
ColumnModel columnModel = new ColumnModel(Arrays.asList(icon, name, visibleColumn, dashboardColumn));
return columnModel;
}
Aggregations