use of com.extjs.gxt.ui.client.widget.grid.ColumnModel in project activityinfo by bedatadriven.
the class DrillDownEditor method buildColumnModel.
private ColumnModel buildColumnModel() {
List<ColumnConfig> config = new ArrayList<>();
config.add(new ColumnConfig("database", I18N.CONSTANTS.database(), 100));
config.add(new ColumnConfig("activity", I18N.CONSTANTS.activity(), 100));
config.add(new ColumnConfig("partner", I18N.CONSTANTS.partner(), 100));
config.add(new ColumnConfig("location", I18N.CONSTANTS.location(), 100));
config.add(new ColumnConfig("date", I18N.CONSTANTS.date(), 100));
config.add(new ColumnConfig("indicator", I18N.CONSTANTS.indicator(), 100));
ColumnConfig valueColumn = new ColumnConfig("value", I18N.CONSTANTS.value(), 100);
valueColumn.setNumberFormat(IndicatorNumberFormat.INSTANCE);
valueColumn.setAlignment(Style.HorizontalAlignment.RIGHT);
config.add(valueColumn);
return new ColumnModel(config);
}
use of com.extjs.gxt.ui.client.widget.grid.ColumnModel in project activityinfo by bedatadriven.
the class DbPartnerEditor method createColumnModel.
private ColumnModel createColumnModel() {
List<ColumnConfig> columns = new ArrayList<>();
columns.add(new ColumnConfig("name", I18N.CONSTANTS.name(), 150));
columns.add(new ColumnConfig("fullName", I18N.CONSTANTS.description(), 300));
return new ColumnModel(columns);
}
use of com.extjs.gxt.ui.client.widget.grid.ColumnModel in project activityinfo by bedatadriven.
the class DbProjectGrid method createColumnModel.
protected ColumnModel createColumnModel() {
List<ColumnConfig> columns = new ArrayList<>();
columns.add(new ColumnConfig("name", messages.name(), 150));
columns.add(new ColumnConfig("description", messages.description(), 300));
return new ColumnModel(columns);
}
use of com.extjs.gxt.ui.client.widget.grid.ColumnModel in project activityinfo by bedatadriven.
the class SiteGridPanel method load.
public void load(final GroupingModel grouping, final Filter filter) {
removeAll();
add(new LoadingPlaceHolder());
layout();
columnModelProvider.fetchColumnModels(filter, grouping, new SuccessCallback<ColumnModel>() {
@Override
public void onSuccess(ColumnModel columnModel) {
createGrid(grouping, filter, columnModel);
}
});
updateHeading(filter);
}
use of com.extjs.gxt.ui.client.widget.grid.ColumnModel in project activityinfo by bedatadriven.
the class PiechartLayerOptions method setupIndicatorOptionsGrid.
private void setupIndicatorOptionsGrid() {
List<ColumnConfig> columnConfigs = new ArrayList<ColumnConfig>();
columnConfigs.add(new EditColorColumn());
columnConfigs.add(new ReadTextColumn("name", I18N.CONSTANTS.indicators(), 50));
ColumnModel columnmodelIndicators = new ColumnModel(columnConfigs);
EditorGrid<NamedSlice> indicatorOptionGrid = new EditorGrid<NamedSlice>(indicatorsStore, columnmodelIndicators);
indicatorOptionGrid.setBorders(false);
indicatorOptionGrid.setAutoExpandColumn("name");
indicatorOptionGrid.setAutoWidth(true);
indicatorOptionGrid.setHeight(100);
indicatorOptionGrid.getView().setShowDirtyCells(false);
indicatorOptionGrid.setSelectionModel(new CellSelectionModel<PiechartLayerOptions.NamedSlice>());
indicatorOptionGrid.addListener(Events.AfterEdit, new Listener<GridEvent<NamedSlice>>() {
@Override
public void handleEvent(GridEvent<NamedSlice> be) {
be.getModel().getSlice().setColor(be.getModel().getColor());
ValueChangeEvent.fire(PiechartLayerOptions.this, piechartMapLayer);
}
});
VBoxLayoutData vbld = new VBoxLayoutData();
vbld.setFlex(1);
panel.add(indicatorOptionGrid);
}
Aggregations