Search in sources :

Example 1 with Label

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

the class ReportPortlet method onModelLoad.

private void onModelLoad(ReportDTO dto) {
    Report report = dto.getReport();
    if (report.getElements().isEmpty()) {
        removeAll();
        add(new Label("The report is empty"));
        return;
    }
    final ReportElement element = report.getElement(0);
    final ReportView view = createView(element);
    if (view == null) {
        removeAll();
        add(new Label("Unsupport report type"));
        layout();
        return;
    }
    dispatcher.execute(new GenerateElement<Content>(element), new AsyncCallback<Content>() {

        @Override
        public void onFailure(Throwable caught) {
        // TODO Auto-generated method stub
        }

        @Override
        public void onSuccess(Content result) {
            element.setContent(result);
            view.show(element);
            removeAll();
            add(view.asComponent());
            layout();
        }
    });
}
Also used : Report(org.activityinfo.shared.report.model.Report) Content(org.activityinfo.shared.report.content.Content) Label(com.extjs.gxt.ui.client.widget.Label) MapReportView(org.activityinfo.client.report.view.MapReportView) ReportView(org.activityinfo.client.report.view.ReportView) PivotChartReportElement(org.activityinfo.shared.report.model.PivotChartReportElement) PivotTableReportElement(org.activityinfo.shared.report.model.PivotTableReportElement) MapReportElement(org.activityinfo.shared.report.model.MapReportElement) ReportElement(org.activityinfo.shared.report.model.ReportElement)

Example 2 with Label

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

the class BaseMapDialog method failLoadingBaseMaps.

private void failLoadingBaseMaps() {
    Label labelFailLoading = new Label(I18N.CONSTANTS.failBaseMapLoading());
    add(labelFailLoading);
}
Also used : Label(com.extjs.gxt.ui.client.widget.Label)

Example 3 with Label

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

the class BaseMapDialog method failLoadingBaseMaps.

private void failLoadingBaseMaps() {
    Label labelFailLoading = new Label(I18N.CONSTANTS.failBaseMapLoading());
    add(labelFailLoading);
}
Also used : Label(com.extjs.gxt.ui.client.widget.Label)

Example 4 with Label

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

the class DataEntryPage method createToolBar.

private ActionToolBar createToolBar() {
    toolBar = new ActionToolBar(this);
    groupingComboBox = new GroupingComboBox(dispatcher);
    groupingComboBox.withSelectionListener(new Listener<FieldEvent>() {

        @Override
        public void handleEvent(FieldEvent be) {
            eventBus.fireEvent(new NavigationEvent(NavigationHandler.NAVIGATION_REQUESTED, currentPlace.copy().setGrouping(groupingComboBox.getGroupingModel())));
        }
    });
    toolBar.add(new Label(I18N.CONSTANTS.grouping()));
    toolBar.add(groupingComboBox);
    toolBar.addButton(UIActions.ADD, I18N.CONSTANTS.newSite(), IconImageBundle.ICONS.add());
    toolBar.addButton(UIActions.EDIT, I18N.CONSTANTS.edit(), IconImageBundle.ICONS.edit());
    toolBar.addDeleteButton(I18N.CONSTANTS.deleteSite());
    toolBar.add(new SeparatorToolItem());
    toolBar.addButton("IMPORT", "Import", IconImageBundle.ICONS.importIcon());
    toolBar.addExcelExportButton();
    toolBar.addPrintButton();
    toolBar.addButton("EMBED", I18N.CONSTANTS.embed(), IconImageBundle.ICONS.embed());
    return toolBar;
}
Also used : NavigationEvent(org.activityinfo.client.event.NavigationEvent) FieldEvent(com.extjs.gxt.ui.client.event.FieldEvent) SeparatorToolItem(com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem) Label(com.extjs.gxt.ui.client.widget.Label) ActionToolBar(org.activityinfo.client.page.common.toolbar.ActionToolBar) GroupingComboBox(org.activityinfo.client.page.entry.grouping.GroupingComboBox)

Aggregations

Label (com.extjs.gxt.ui.client.widget.Label)4 FieldEvent (com.extjs.gxt.ui.client.event.FieldEvent)1 SeparatorToolItem (com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem)1 NavigationEvent (org.activityinfo.client.event.NavigationEvent)1 ActionToolBar (org.activityinfo.client.page.common.toolbar.ActionToolBar)1 GroupingComboBox (org.activityinfo.client.page.entry.grouping.GroupingComboBox)1 MapReportView (org.activityinfo.client.report.view.MapReportView)1 ReportView (org.activityinfo.client.report.view.ReportView)1 Content (org.activityinfo.shared.report.content.Content)1 MapReportElement (org.activityinfo.shared.report.model.MapReportElement)1 PivotChartReportElement (org.activityinfo.shared.report.model.PivotChartReportElement)1 PivotTableReportElement (org.activityinfo.shared.report.model.PivotTableReportElement)1 Report (org.activityinfo.shared.report.model.Report)1 ReportElement (org.activityinfo.shared.report.model.ReportElement)1