Search in sources :

Example 6 with Text

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

the class IndicatorSection method addQuantityTable.

private void addQuantityTable(IndicatorGroup group) {
    // Layout in three columns
    // Label | Field | Units
    TableData fieldLayout = new TableData();
    fieldLayout.setWidth(NUMBER_FIELD_WIDTH + "px");
    fieldLayout.setVerticalAlign(Style.VerticalAlignment.TOP);
    TableData unitLayout = new TableData();
    unitLayout.setWidth(UNITS_FIELD_WIDTH + "px");
    unitLayout.setVerticalAlign(Style.VerticalAlignment.TOP);
    TableLayout layout = new TableLayout();
    layout.setWidth("100%");
    layout.setColumns(3);
    layout.setCellPadding(5);
    LayoutContainer table = new LayoutContainer();
    table.setLayout(layout);
    table.setAutoHeight(true);
    for (IndicatorDTO indicator : group.getIndicators()) {
        if (!indicator.isCalculated() && indicator.isVisible()) {
            Text fieldLabel = createLabel(indicator);
            Field field = createField(indicator);
            field.setWidth(NUMBER_FIELD_WIDTH);
            Text unitLabel = new Text(indicator.getUnits());
            unitLabel.setWidth(UNITS_FIELD_WIDTH);
            unitLabel.setStyleAttribute("fontSize", "9pt");
            table.add(fieldLabel);
            table.add(field, fieldLayout);
            table.add(unitLabel, unitLayout);
        }
    }
    add(table);
}
Also used : TextField(com.extjs.gxt.ui.client.widget.form.TextField) NumberField(com.extjs.gxt.ui.client.widget.form.NumberField) Field(com.extjs.gxt.ui.client.widget.form.Field) IndicatorDTO(org.activityinfo.legacy.shared.model.IndicatorDTO) LayoutContainer(com.extjs.gxt.ui.client.widget.LayoutContainer) Text(com.extjs.gxt.ui.client.widget.Text) TableData(com.extjs.gxt.ui.client.widget.layout.TableData) TableLayout(com.extjs.gxt.ui.client.widget.layout.TableLayout)

Example 7 with Text

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

the class AdminLevelPanel method showLoading.

private void showLoading() {
    removeAll();
    add(new Text(I18N.CONSTANTS.loading()));
    layout();
}
Also used : Text(com.extjs.gxt.ui.client.widget.Text)

Example 8 with Text

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

the class AdminLevelPanel method addMissingPolygonMessage.

private void addMissingPolygonMessage() {
    Text text = new Text(I18N.CONSTANTS.noPolygonsWarning());
    Margins margin = new Margins(15, 15, 0, 0);
    add(text, new FlowData(margin));
}
Also used : FlowData(com.extjs.gxt.ui.client.widget.layout.FlowData) Margins(com.extjs.gxt.ui.client.util.Margins) Text(com.extjs.gxt.ui.client.widget.Text)

Aggregations

Text (com.extjs.gxt.ui.client.widget.Text)8 Margins (com.extjs.gxt.ui.client.util.Margins)2 LayoutContainer (com.extjs.gxt.ui.client.widget.LayoutContainer)2 TextField (com.extjs.gxt.ui.client.widget.form.TextField)2 IndicatorDTO (org.activityinfo.legacy.shared.model.IndicatorDTO)2 ButtonEvent (com.extjs.gxt.ui.client.event.ButtonEvent)1 ContentPanel (com.extjs.gxt.ui.client.widget.ContentPanel)1 Button (com.extjs.gxt.ui.client.widget.button.Button)1 Field (com.extjs.gxt.ui.client.widget.form.Field)1 NumberField (com.extjs.gxt.ui.client.widget.form.NumberField)1 FlowData (com.extjs.gxt.ui.client.widget.layout.FlowData)1 HBoxLayout (com.extjs.gxt.ui.client.widget.layout.HBoxLayout)1 RowData (com.extjs.gxt.ui.client.widget.layout.RowData)1 TableData (com.extjs.gxt.ui.client.widget.layout.TableData)1 TableLayout (com.extjs.gxt.ui.client.widget.layout.TableLayout)1 VBoxLayout (com.extjs.gxt.ui.client.widget.layout.VBoxLayout)1