Search in sources :

Example 1 with Text

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

the class AdminLevelPanel method showLoadingFailed.

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

Example 2 with Text

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

the class ReportViewRetrier method createRetryPanel.

private static ContentPanel createRetryPanel(final Throwable caught, final ClickHandler retryCallback) {
    Button retryButton = new Button(I18N.CONSTANTS.retry());
    retryButton.addSelectionListener(new SelectionListener<ButtonEvent>() {

        @Override
        public void componentSelected(ButtonEvent ce) {
            if (retryCallback != null) {
                retryCallback.onClick(null);
            }
        }
    });
    Text label = new Text(ExceptionOracle.getExplanation(caught));
    label.setWidth("50%");
    VBoxLayout layout = new VBoxLayout(VBoxLayout.VBoxLayoutAlign.CENTER);
    ContentPanel panel = new ContentPanel();
    panel.setHeaderVisible(false);
    panel.setLayout(layout);
    panel.add(label, new RowData(1, -1, new Margins(4)));
    panel.add(retryButton, new RowData(-1, -1, new Margins(4)));
    return panel;
}
Also used : VBoxLayout(com.extjs.gxt.ui.client.widget.layout.VBoxLayout) RowData(com.extjs.gxt.ui.client.widget.layout.RowData) Button(com.extjs.gxt.ui.client.widget.button.Button) ButtonEvent(com.extjs.gxt.ui.client.event.ButtonEvent) Margins(com.extjs.gxt.ui.client.util.Margins) Text(com.extjs.gxt.ui.client.widget.Text) ContentPanel(com.extjs.gxt.ui.client.widget.ContentPanel)

Example 3 with Text

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

the class IndicatorSection method createLabel.

private Text createLabel(IndicatorDTO indicator) {
    String name = indicator.getName();
    if (indicator.isMandatory()) {
        name += " *";
    }
    Text indicatorLabel = new Text(name);
    indicatorLabel.setStyleAttribute("fontSize", "9pt");
    return indicatorLabel;
}
Also used : Text(com.extjs.gxt.ui.client.widget.Text)

Example 4 with Text

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

the class IndicatorSection method addGroupHeader.

private void addGroupHeader(String name) {
    Text header = new Text(name);
    header.setStyleAttribute("fontSize", "9pt");
    header.setStyleAttribute("fontWeight", "bold");
    header.setStyleAttribute("marginTop", "6pt");
    add(header);
}
Also used : Text(com.extjs.gxt.ui.client.widget.Text)

Example 5 with Text

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

the class IndicatorSection method addMixedGroup.

private void addMixedGroup(IndicatorGroup group) {
    for (IndicatorDTO indicator : group.getIndicators()) {
        if (!indicator.isCalculated() && indicator.isVisible()) {
            Text fieldLabel = createLabel(indicator);
            fieldLabel.setStyleAttribute("marginTop", "8px");
            fieldLabel.setStyleAttribute("marginBottom", "3px");
            add(fieldLabel);
            TextField field = createField(indicator);
            if (indicator.getType() == FieldTypeClass.QUANTITY) {
                HBoxLayout rowLayout = new HBoxLayout();
                rowLayout.setHBoxLayoutAlign(HBoxLayout.HBoxLayoutAlign.MIDDLE);
                Text unitsLabel = new Text(indicator.getUnits());
                unitsLabel.setStyleAttribute("paddingLeft", "5px");
                LayoutContainer row = new LayoutContainer();
                row.setLayout(rowLayout);
                row.add(field);
                row.add(unitsLabel);
                add(row);
            } else {
                field.setWidth(TEXT_FIELD_WIDTH);
                add(field);
            }
        }
    }
}
Also used : IndicatorDTO(org.activityinfo.legacy.shared.model.IndicatorDTO) LayoutContainer(com.extjs.gxt.ui.client.widget.LayoutContainer) HBoxLayout(com.extjs.gxt.ui.client.widget.layout.HBoxLayout) TextField(com.extjs.gxt.ui.client.widget.form.TextField) 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