use of com.extjs.gxt.ui.client.widget.layout.VBoxLayoutData 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