Search in sources :

Example 11 with LabelField

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

the class BubbleLayerOptions method createColorPicker.

private void createColorPicker() {
    colorPicker.setValue("000000");
    // Set the selected color to the maplayer
    colorPicker.addListener(Events.Select, new Listener<ColorPaletteEvent>() {

        @Override
        public void handleEvent(ColorPaletteEvent be) {
            bubbleMapLayer.setBubbleColor(colorPicker.getValue());
            ValueChangeEvent.fire(BubbleLayerOptions.this, bubbleMapLayer);
        }
    });
    LabelField labelColor = new LabelField(I18N.CONSTANTS.color());
    add(labelColor);
    add(colorPicker);
}
Also used : ColorPaletteEvent(com.extjs.gxt.ui.client.event.ColorPaletteEvent) LabelField(com.extjs.gxt.ui.client.widget.form.LabelField)

Example 12 with LabelField

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

the class DateRangePanel method createToDateField.

private void createToDateField() {
    add(new LabelField(I18N.CONSTANTS.toDate()));
    datefieldMaxDate = new DateField();
    add(datefieldMaxDate);
}
Also used : DateField(com.extjs.gxt.ui.client.widget.form.DateField) LabelField(com.extjs.gxt.ui.client.widget.form.LabelField)

Example 13 with LabelField

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

the class DateRangePanel method createFromDateField.

private void createFromDateField() {
    add(new LabelField(I18N.CONSTANTS.fromDate()));
    datefieldMinDate = new DateField();
    add(datefieldMinDate);
}
Also used : DateField(com.extjs.gxt.ui.client.widget.form.DateField) LabelField(com.extjs.gxt.ui.client.widget.form.LabelField)

Example 14 with LabelField

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

the class SearchResultItem method setChilds.

public void setChilds(List<Axis> childList) {
    for (Axis axis : childList) {
        VerticalPanel panelAll = new VerticalPanel();
        HorizontalPanel panelChild = new HorizontalPanel();
        HorizontalPanel spacer = new HorizontalPanel();
        spacer.setWidth(20);
        panelChild.add(spacer);
        Image image = IconImageBundle.ICONS.activity().createImage();
        panelChild.add(image);
        panelAll.add(panelChild);
        EntityCategory activity = (EntityCategory) axis.getCategory();
        Hyperlink link = new Hyperlink(axis.getLabel(), PageStateSerializer.serialize(new DataEntryPlace(Filter.filter().onActivity(activity.getId()))));
        link.setStylePrimaryName("link");
        panelChild.add(link);
        for (Axis childAxis : axis.getChildren()) {
            HorizontalPanel panelIndicator = new HorizontalPanel();
            HorizontalPanel spacerIndicator = new HorizontalPanel();
            spacerIndicator.setWidth(40);
            panelIndicator.add(spacerIndicator);
            panelIndicator.add(IconImageBundle.ICONS.indicator().createImage());
            // Hyperlink linkIndicator = new Hyperlink(childAxis.getLabel(),
            // "site-grid/" +
            // ((EntityCategory)childAxis.getCategory()).getId());
            // linkIndicator.setStylePrimaryName("link");
            // panelIndicator.add(linkIndicator);
            LabelField labelIndicator = new LabelField(childAxis.getLabel());
            panelIndicator.add(labelIndicator);
            panelAll.add(panelIndicator);
            indicatorCount++;
        }
        activityCount++;
        childPanel.add(panelAll);
    }
}
Also used : VerticalPanel(com.extjs.gxt.ui.client.widget.VerticalPanel) DataEntryPlace(org.activityinfo.client.page.entry.place.DataEntryPlace) HorizontalPanel(com.extjs.gxt.ui.client.widget.HorizontalPanel) Image(com.google.gwt.user.client.ui.Image) EntityCategory(org.activityinfo.shared.report.content.EntityCategory) LabelField(com.extjs.gxt.ui.client.widget.form.LabelField) Axis(org.activityinfo.shared.report.content.PivotTableData.Axis) Hyperlink(com.google.gwt.user.client.ui.Hyperlink)

Example 15 with LabelField

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

the class SearchResultsPage method showSearchResults.

private void showSearchResults() {
    searchResultsPanel.removeAll();
    clearErrorsIfShowing();
    int activities = 0;
    int databases = 0;
    int indicators = 0;
    LabelField labelResults = new LabelField();
    searchResultsPanel.add(labelResults);
    if (pivotContent != null) {
        VerticalPanel panelSpacer = new VerticalPanel();
        panelSpacer.setHeight(16);
        searchResultsPanel.add(panelSpacer);
        searchResultsPanel.setStylePrimaryName("searchResults");
        for (Axis axis : pivotContent.getData().getRootRow().getChildren()) {
            SearchResultItem itemWidget = new SearchResultItem();
            itemWidget.setDabaseName(axis.getLabel());
            itemWidget.setChilds(axis.getChildList());
            searchResultsPanel.add(itemWidget);
            databases++;
            activities += itemWidget.getActivityCount();
            indicators += itemWidget.getIndicatorCount();
        }
    }
    labelResults.setText(I18N.MESSAGES.searchResultsFound(searchQuery, Integer.toString(databases), Integer.toString(activities), Integer.toString(indicators)));
    layout();
}
Also used : VerticalPanel(com.extjs.gxt.ui.client.widget.VerticalPanel) LabelField(com.extjs.gxt.ui.client.widget.form.LabelField) Axis(org.activityinfo.shared.report.content.PivotTableData.Axis)

Aggregations

LabelField (com.extjs.gxt.ui.client.widget.form.LabelField)17 DateField (com.extjs.gxt.ui.client.widget.form.DateField)5 ColorPaletteEvent (com.extjs.gxt.ui.client.event.ColorPaletteEvent)4 HorizontalPanel (com.extjs.gxt.ui.client.widget.HorizontalPanel)4 SliderEvent (com.extjs.gxt.ui.client.event.SliderEvent)2 VerticalPanel (com.extjs.gxt.ui.client.widget.VerticalPanel)2 Timer (com.google.gwt.user.client.Timer)2 Axis (org.activityinfo.shared.report.content.PivotTableData.Axis)2 FieldEvent (com.extjs.gxt.ui.client.event.FieldEvent)1 CheckBox (com.extjs.gxt.ui.client.widget.form.CheckBox)1 FieldSet (com.extjs.gxt.ui.client.widget.form.FieldSet)1 Radio (com.extjs.gxt.ui.client.widget.form.Radio)1 RadioGroup (com.extjs.gxt.ui.client.widget.form.RadioGroup)1 Hyperlink (com.google.gwt.user.client.ui.Hyperlink)1 Image (com.google.gwt.user.client.ui.Image)1 DataEntryPlace (org.activityinfo.client.page.entry.place.DataEntryPlace)1 ActivityDTO (org.activityinfo.shared.dto.ActivityDTO)1 AdminEntityDTO (org.activityinfo.shared.dto.AdminEntityDTO)1 ProjectDTO (org.activityinfo.shared.dto.ProjectDTO)1 EntityCategory (org.activityinfo.shared.report.content.EntityCategory)1