Search in sources :

Example 6 with ColumnConfig

use of com.extjs.gxt.ui.client.widget.grid.ColumnConfig in project activityinfo by bedatadriven.

the class ColumnModelBuilder method addTreeNameColumn.

public ColumnModelBuilder addTreeNameColumn() {
    ColumnConfig name = new ColumnConfig("name", I18N.CONSTANTS.location(), 200);
    name.setToolTip(I18N.CONSTANTS.location());
    name.setRenderer(new TreeNameCellRenderer());
    columns.add(name);
    return this;
}
Also used : ColumnConfig(com.extjs.gxt.ui.client.widget.grid.ColumnConfig)

Example 7 with ColumnConfig

use of com.extjs.gxt.ui.client.widget.grid.ColumnConfig in project activityinfo by bedatadriven.

the class ColumnModelBuilder method addDeletedLocationWarning.

public ColumnModelBuilder addDeletedLocationWarning() {
    ColumnConfig deletedWarning = new ColumnConfig("deleted", "", 25);
    deletedWarning.setRenderer(new DeletedLocationCellRenderer());
    columns.add(deletedWarning);
    return this;
}
Also used : ColumnConfig(com.extjs.gxt.ui.client.widget.grid.ColumnConfig)

Example 8 with ColumnConfig

use of com.extjs.gxt.ui.client.widget.grid.ColumnConfig in project activityinfo by bedatadriven.

the class ColumnModelBuilder method addActivityColumn.

public ColumnModelBuilder addActivityColumn(final SchemaDTO schema) {
    ColumnConfig config = new ColumnConfig("activityId", I18N.CONSTANTS.activity(), 100);
    config.setToolTip(I18N.CONSTANTS.activity());
    config.setRenderer(new ActivityCellRenderer(schema));
    columns.add(config);
    return this;
}
Also used : ColumnConfig(com.extjs.gxt.ui.client.widget.grid.ColumnConfig)

Example 9 with ColumnConfig

use of com.extjs.gxt.ui.client.widget.grid.ColumnConfig in project activityinfo by bedatadriven.

the class ColumnModelBuilder method addActivityColumn.

public ColumnModelBuilder addActivityColumn(final UserDatabaseDTO database) {
    ColumnConfig config = new ColumnConfig("activityId", I18N.CONSTANTS.activity(), 100);
    config.setToolTip(I18N.CONSTANTS.activity());
    config.setRenderer(new ActivityCellRenderer(database));
    columns.add(config);
    return this;
}
Also used : ColumnConfig(com.extjs.gxt.ui.client.widget.grid.ColumnConfig)

Example 10 with ColumnConfig

use of com.extjs.gxt.ui.client.widget.grid.ColumnConfig 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);
}
Also used : VBoxLayoutData(com.extjs.gxt.ui.client.widget.layout.VBoxLayoutData) GridEvent(com.extjs.gxt.ui.client.event.GridEvent) ColumnConfig(com.extjs.gxt.ui.client.widget.grid.ColumnConfig) ReadTextColumn(org.activityinfo.ui.client.page.common.columns.ReadTextColumn) ArrayList(java.util.ArrayList) EditColorColumn(org.activityinfo.ui.client.page.common.columns.EditColorColumn) EditorGrid(com.extjs.gxt.ui.client.widget.grid.EditorGrid) ColumnModel(com.extjs.gxt.ui.client.widget.grid.ColumnModel)

Aggregations

ColumnConfig (com.extjs.gxt.ui.client.widget.grid.ColumnConfig)15 ColumnModel (com.extjs.gxt.ui.client.widget.grid.ColumnModel)5 ArrayList (java.util.ArrayList)5 NumberField (com.extjs.gxt.ui.client.widget.form.NumberField)2 CellEditor (com.extjs.gxt.ui.client.widget.grid.CellEditor)2 GridEvent (com.extjs.gxt.ui.client.event.GridEvent)1 EditorGrid (com.extjs.gxt.ui.client.widget.grid.EditorGrid)1 VBoxLayoutData (com.extjs.gxt.ui.client.widget.layout.VBoxLayoutData)1 EditColorColumn (org.activityinfo.ui.client.page.common.columns.EditColorColumn)1 ReadTextColumn (org.activityinfo.ui.client.page.common.columns.ReadTextColumn)1