Search in sources :

Example 16 with HorizontalLayout

use of com.vaadin.v7.ui.HorizontalLayout in project SORMAS-Project by hzi-braunschweig.

the class ContinentsView method createFilterBar.

private HorizontalLayout createFilterBar() {
    filterLayout = new HorizontalLayout();
    filterLayout.setMargin(false);
    filterLayout.setSpacing(true);
    filterLayout.setWidth(100, Unit.PERCENTAGE);
    searchField = new SearchField();
    searchField.addTextChangeListener(e -> {
        criteria.nameLike(e.getText());
        grid.reload();
    });
    filterLayout.addComponent(searchField);
    resetButton = ButtonHelper.createButton(Captions.actionResetFilters, event -> {
        ViewModelProviders.of(ContinentsView.class).remove(ContinentCriteria.class);
        navigateTo(null);
    }, CssStyles.FORCE_CAPTION);
    resetButton.setVisible(false);
    filterLayout.addComponent(resetButton);
    HorizontalLayout actionButtonsLayout = new HorizontalLayout();
    actionButtonsLayout.setSpacing(true);
    {
        // Show active/archived/all dropdown
        if (UserProvider.getCurrent().hasUserRight(UserRight.INFRASTRUCTURE_VIEW)) {
            relevanceStatusFilter = ComboBoxHelper.createComboBoxV7();
            relevanceStatusFilter.setId("relevanceStatus");
            relevanceStatusFilter.setWidth(220, Unit.PERCENTAGE);
            relevanceStatusFilter.setNullSelectionAllowed(false);
            relevanceStatusFilter.addItems((Object[]) EntityRelevanceStatus.values());
            relevanceStatusFilter.setItemCaption(EntityRelevanceStatus.ACTIVE, I18nProperties.getCaption(Captions.continentActiveContinents));
            relevanceStatusFilter.setItemCaption(EntityRelevanceStatus.ARCHIVED, I18nProperties.getCaption(Captions.continentArchivedContinents));
            relevanceStatusFilter.setItemCaption(EntityRelevanceStatus.ALL, I18nProperties.getCaption(Captions.continentAllContinents));
            relevanceStatusFilter.addValueChangeListener(e -> {
                criteria.relevanceStatus((EntityRelevanceStatus) e.getProperty().getValue());
                navigateTo(criteria);
            });
            actionButtonsLayout.addComponent(relevanceStatusFilter);
            // Bulk operation dropdown
            if (UserProvider.getCurrent().hasUserRight(UserRight.PERFORM_BULK_OPERATIONS)) {
                bulkOperationsDropdown = MenuBarHelper.createDropDown(Captions.bulkActions, new MenuBarHelper.MenuBarItem(I18nProperties.getCaption(Captions.actionArchiveInfrastructure), VaadinIcons.ARCHIVE, selectedItem -> {
                    ControllerProvider.getInfrastructureController().archiveOrDearchiveAllSelectedItems(true, grid.asMultiSelect().getSelectedItems(), InfrastructureType.CONTINENT, () -> navigateTo(criteria));
                }, EntityRelevanceStatus.ACTIVE.equals(criteria.getRelevanceStatus())), new MenuBarHelper.MenuBarItem(I18nProperties.getCaption(Captions.actionDearchiveInfrastructure), VaadinIcons.ARCHIVE, selectedItem -> {
                    ControllerProvider.getInfrastructureController().archiveOrDearchiveAllSelectedItems(false, grid.asMultiSelect().getSelectedItems(), InfrastructureType.CONTINENT, () -> navigateTo(criteria));
                }, EntityRelevanceStatus.ARCHIVED.equals(criteria.getRelevanceStatus())));
                bulkOperationsDropdown.setVisible(isBulkOperationsDropdownVisible());
                actionButtonsLayout.addComponent(bulkOperationsDropdown);
            }
        }
    }
    filterLayout.addComponent(actionButtonsLayout);
    filterLayout.setComponentAlignment(actionButtonsLayout, Alignment.BOTTOM_RIGHT);
    filterLayout.setExpandRatio(actionButtonsLayout, 1);
    return filterLayout;
}
Also used : FeatureType(de.symeda.sormas.api.feature.FeatureType) RowCount(de.symeda.sormas.ui.utils.RowCount) StreamResource(com.vaadin.server.StreamResource) SearchField(de.symeda.sormas.ui.configuration.infrastructure.components.SearchField) VaadinUiUtil(de.symeda.sormas.ui.utils.VaadinUiUtil) FacadeProvider(de.symeda.sormas.api.FacadeProvider) I18nProperties(de.symeda.sormas.api.i18n.I18nProperties) VerticalLayout(com.vaadin.ui.VerticalLayout) Alignment(com.vaadin.ui.Alignment) GridExportStreamResource(de.symeda.sormas.ui.utils.GridExportStreamResource) Window(com.vaadin.ui.Window) EntityRelevanceStatus(de.symeda.sormas.api.EntityRelevanceStatus) ContinentCriteria(de.symeda.sormas.api.infrastructure.continent.ContinentCriteria) ControllerProvider(de.symeda.sormas.ui.ControllerProvider) ExportEntityName(de.symeda.sormas.ui.utils.ExportEntityName) ViewConfiguration(de.symeda.sormas.ui.utils.ViewConfiguration) ViewModelProviders(de.symeda.sormas.ui.ViewModelProviders) CssStyles(de.symeda.sormas.ui.utils.CssStyles) MenuBarHelper(de.symeda.sormas.ui.utils.MenuBarHelper) Label(com.vaadin.ui.Label) VaadinIcons(com.vaadin.icons.VaadinIcons) ComboBoxHelper(de.symeda.sormas.ui.utils.ComboBoxHelper) ViewChangeListener(com.vaadin.navigator.ViewChangeListener) AbstractConfigurationView(de.symeda.sormas.ui.configuration.AbstractConfigurationView) UserProvider(de.symeda.sormas.ui.UserProvider) ButtonHelper(de.symeda.sormas.ui.utils.ButtonHelper) ValoTheme(com.vaadin.ui.themes.ValoTheme) MenuBar(com.vaadin.ui.MenuBar) ComboBox(com.vaadin.v7.ui.ComboBox) InfrastructureType(de.symeda.sormas.api.infrastructure.InfrastructureType) ContinentIndexDto(de.symeda.sormas.api.infrastructure.continent.ContinentIndexDto) Captions(de.symeda.sormas.api.i18n.Captions) UserRight(de.symeda.sormas.api.user.UserRight) Button(com.vaadin.ui.Button) HorizontalLayout(com.vaadin.ui.HorizontalLayout) FileDownloader(com.vaadin.server.FileDownloader) Descriptions(de.symeda.sormas.api.i18n.Descriptions) Strings(de.symeda.sormas.api.i18n.Strings) Collections(java.util.Collections) SearchField(de.symeda.sormas.ui.configuration.infrastructure.components.SearchField) MenuBarHelper(de.symeda.sormas.ui.utils.MenuBarHelper) EntityRelevanceStatus(de.symeda.sormas.api.EntityRelevanceStatus) ContinentCriteria(de.symeda.sormas.api.infrastructure.continent.ContinentCriteria) HorizontalLayout(com.vaadin.ui.HorizontalLayout)

Example 17 with HorizontalLayout

use of com.vaadin.v7.ui.HorizontalLayout in project SORMAS-Project by hzi-braunschweig.

the class CountriesView method createFilterBar.

private HorizontalLayout createFilterBar() {
    filterLayout = new HorizontalLayout();
    filterLayout.setMargin(false);
    filterLayout.setSpacing(true);
    filterLayout.setWidth(100, Unit.PERCENTAGE);
    searchField = new SearchField();
    searchField.addTextChangeListener(e -> {
        criteria.nameCodeLike(e.getText());
        grid.reload();
    });
    filterLayout.addComponent(searchField);
    subcontinentFilter = ComboBoxHelper.createComboBoxV7();
    subcontinentFilter.setId(CountryDto.SUBCONTINENT);
    subcontinentFilter.setWidth(140, Unit.PIXELS);
    subcontinentFilter.setCaption(I18nProperties.getPrefixCaption(CountryDto.I18N_PREFIX, CountryDto.SUBCONTINENT));
    subcontinentFilter.addItems(FacadeProvider.getSubcontinentFacade().getAllActiveAsReference());
    subcontinentFilter.addValueChangeListener(e -> {
        criteria.subcontinent((SubcontinentReferenceDto) e.getProperty().getValue());
        navigateTo(criteria);
    });
    filterLayout.addComponent(subcontinentFilter);
    resetButton = ButtonHelper.createButton(Captions.actionResetFilters, event -> {
        ViewModelProviders.of(CountriesView.class).remove(CountryCriteria.class);
        navigateTo(null);
    }, CssStyles.FORCE_CAPTION);
    resetButton.setVisible(false);
    filterLayout.addComponent(resetButton);
    HorizontalLayout actionButtonsLayout = new HorizontalLayout();
    actionButtonsLayout.setSpacing(true);
    {
        // Show active/archived/all dropdown
        if (UserProvider.getCurrent().hasUserRight(UserRight.INFRASTRUCTURE_VIEW)) {
            relevanceStatusFilter = ComboBoxHelper.createComboBoxV7();
            relevanceStatusFilter.setId("relevanceStatus");
            relevanceStatusFilter.setWidth(220, Unit.PERCENTAGE);
            relevanceStatusFilter.setNullSelectionAllowed(false);
            relevanceStatusFilter.addItems((Object[]) EntityRelevanceStatus.values());
            relevanceStatusFilter.setItemCaption(EntityRelevanceStatus.ACTIVE, I18nProperties.getCaption(Captions.countryActiveCountries));
            relevanceStatusFilter.setItemCaption(EntityRelevanceStatus.ARCHIVED, I18nProperties.getCaption(Captions.countryArchivedCountries));
            relevanceStatusFilter.setItemCaption(EntityRelevanceStatus.ALL, I18nProperties.getCaption(Captions.countryAllCountries));
            relevanceStatusFilter.addValueChangeListener(e -> {
                criteria.relevanceStatus((EntityRelevanceStatus) e.getProperty().getValue());
                navigateTo(criteria);
            });
            actionButtonsLayout.addComponent(relevanceStatusFilter);
            // Bulk operation dropdown
            if (UserProvider.getCurrent().hasUserRight(UserRight.PERFORM_BULK_OPERATIONS)) {
                bulkOperationsDropdown = MenuBarHelper.createDropDown(Captions.bulkActions, new MenuBarHelper.MenuBarItem(I18nProperties.getCaption(Captions.actionArchiveInfrastructure), VaadinIcons.ARCHIVE, selectedItem -> {
                    ControllerProvider.getInfrastructureController().archiveOrDearchiveAllSelectedItems(true, grid.asMultiSelect().getSelectedItems(), InfrastructureType.COUNTRY, () -> navigateTo(criteria));
                }, EntityRelevanceStatus.ACTIVE.equals(criteria.getRelevanceStatus())), new MenuBarHelper.MenuBarItem(I18nProperties.getCaption(Captions.actionDearchiveInfrastructure), VaadinIcons.ARCHIVE, selectedItem -> {
                    ControllerProvider.getInfrastructureController().archiveOrDearchiveAllSelectedItems(false, grid.asMultiSelect().getSelectedItems(), InfrastructureType.COUNTRY, () -> navigateTo(criteria));
                }, EntityRelevanceStatus.ARCHIVED.equals(criteria.getRelevanceStatus())));
                bulkOperationsDropdown.setVisible(isBulkOperationsDropdownVisible());
                actionButtonsLayout.addComponent(bulkOperationsDropdown);
            }
        }
    }
    filterLayout.addComponent(actionButtonsLayout);
    filterLayout.setComponentAlignment(actionButtonsLayout, Alignment.BOTTOM_RIGHT);
    filterLayout.setExpandRatio(actionButtonsLayout, 1);
    return filterLayout;
}
Also used : FeatureType(de.symeda.sormas.api.feature.FeatureType) RowCount(de.symeda.sormas.ui.utils.RowCount) CountryDto(de.symeda.sormas.api.infrastructure.country.CountryDto) StreamResource(com.vaadin.server.StreamResource) SearchField(de.symeda.sormas.ui.configuration.infrastructure.components.SearchField) VaadinUiUtil(de.symeda.sormas.ui.utils.VaadinUiUtil) FacadeProvider(de.symeda.sormas.api.FacadeProvider) I18nProperties(de.symeda.sormas.api.i18n.I18nProperties) VerticalLayout(com.vaadin.ui.VerticalLayout) Alignment(com.vaadin.ui.Alignment) GridExportStreamResource(de.symeda.sormas.ui.utils.GridExportStreamResource) Window(com.vaadin.ui.Window) EntityRelevanceStatus(de.symeda.sormas.api.EntityRelevanceStatus) ControllerProvider(de.symeda.sormas.ui.ControllerProvider) ExportEntityName(de.symeda.sormas.ui.utils.ExportEntityName) ViewConfiguration(de.symeda.sormas.ui.utils.ViewConfiguration) ViewModelProviders(de.symeda.sormas.ui.ViewModelProviders) CssStyles(de.symeda.sormas.ui.utils.CssStyles) MenuBarHelper(de.symeda.sormas.ui.utils.MenuBarHelper) Label(com.vaadin.ui.Label) VaadinIcons(com.vaadin.icons.VaadinIcons) ComboBoxHelper(de.symeda.sormas.ui.utils.ComboBoxHelper) ViewChangeListener(com.vaadin.navigator.ViewChangeListener) AbstractConfigurationView(de.symeda.sormas.ui.configuration.AbstractConfigurationView) UserProvider(de.symeda.sormas.ui.UserProvider) ButtonHelper(de.symeda.sormas.ui.utils.ButtonHelper) ValoTheme(com.vaadin.ui.themes.ValoTheme) CountryCriteria(de.symeda.sormas.api.infrastructure.country.CountryCriteria) MenuBar(com.vaadin.ui.MenuBar) ComboBox(com.vaadin.v7.ui.ComboBox) InfrastructureType(de.symeda.sormas.api.infrastructure.InfrastructureType) CountryIndexDto(de.symeda.sormas.api.infrastructure.country.CountryIndexDto) Captions(de.symeda.sormas.api.i18n.Captions) UserRight(de.symeda.sormas.api.user.UserRight) Button(com.vaadin.ui.Button) HorizontalLayout(com.vaadin.ui.HorizontalLayout) FileDownloader(com.vaadin.server.FileDownloader) Descriptions(de.symeda.sormas.api.i18n.Descriptions) SubcontinentReferenceDto(de.symeda.sormas.api.infrastructure.subcontinent.SubcontinentReferenceDto) Strings(de.symeda.sormas.api.i18n.Strings) Collections(java.util.Collections) SearchField(de.symeda.sormas.ui.configuration.infrastructure.components.SearchField) MenuBarHelper(de.symeda.sormas.ui.utils.MenuBarHelper) CountryCriteria(de.symeda.sormas.api.infrastructure.country.CountryCriteria) EntityRelevanceStatus(de.symeda.sormas.api.EntityRelevanceStatus) HorizontalLayout(com.vaadin.ui.HorizontalLayout)

Example 18 with HorizontalLayout

use of com.vaadin.v7.ui.HorizontalLayout in project SORMAS-Project by hzi-braunschweig.

the class FacilitiesView method createFilterBar.

// TODO additional filter bar (active, archived and other)
// private HorizontalLayout createHeaderBar() {
// headerLayout = new HorizontalLayout();
// headerLayout.setSpacing(true);
// headerLayout.setWidth(100, Unit.PERCENTAGE);
// 
// return headerLayout;
// }
private HorizontalLayout createFilterBar() {
    filterLayout = new HorizontalLayout();
    filterLayout.setMargin(false);
    filterLayout.setSpacing(true);
    filterLayout.setWidth(100, Unit.PERCENTAGE);
    searchField = new SearchField();
    searchField.addTextChangeListener(e -> {
        criteria.nameCityLike(e.getText());
        grid.reload();
        rowCount.update(grid.getItemCount());
    });
    filterLayout.addComponent(searchField);
    typeGroupFilter = ComboBoxHelper.createComboBoxV7();
    typeGroupFilter.setId("typeGroup");
    typeGroupFilter.setWidth(220, Unit.PIXELS);
    typeGroupFilter.setCaption(I18nProperties.getCaption(Captions.Facility_typeGroup));
    typeGroupFilter.addItems(FacilityTypeGroup.values());
    typeGroupFilter.addValueChangeListener(e -> {
        criteria.typeGroup((FacilityTypeGroup) e.getProperty().getValue());
        FieldHelper.updateItems(typeFilter, FacilityType.getTypes((FacilityTypeGroup) typeGroupFilter.getValue()));
    });
    filterLayout.addComponent(typeGroupFilter);
    typeFilter = ComboBoxHelper.createComboBoxV7();
    typeFilter.setId(FacilityDto.TYPE);
    typeFilter.setWidth(220, Unit.PIXELS);
    typeFilter.setCaption(I18nProperties.getPrefixCaption(FacilityDto.I18N_PREFIX, FacilityDto.TYPE));
    typeFilter.addValueChangeListener(e -> {
        criteria.type((FacilityType) e.getProperty().getValue());
        navigateTo(criteria);
    });
    filterLayout.addComponent(typeFilter);
    countryFilter = addCountryFilter(filterLayout, country -> {
        criteria.country(country);
        grid.reload();
        rowCount.update(grid.getItemCount());
    }, regionFilter);
    countryFilter.addValueChangeListener(country -> {
        CountryReferenceDto countryReferenceDto = (CountryReferenceDto) country.getProperty().getValue();
        criteria.country(countryReferenceDto);
        navigateTo(criteria);
        FieldHelper.updateItems(regionFilter, countryReferenceDto != null ? FacadeProvider.getRegionFacade().getAllActiveByCountry(countryReferenceDto.getUuid()) : null);
    });
    regionFilter = ComboBoxHelper.createComboBoxV7();
    regionFilter.setId(FacilityDto.REGION);
    regionFilter.setWidth(140, Unit.PIXELS);
    regionFilter.setCaption(I18nProperties.getPrefixCaption(FacilityDto.I18N_PREFIX, FacilityDto.REGION));
    regionFilter.addItems(FacadeProvider.getRegionFacade().getAllActiveAsReference());
    regionFilter.addValueChangeListener(e -> {
        RegionReferenceDto region = (RegionReferenceDto) e.getProperty().getValue();
        criteria.region(region);
        navigateTo(criteria);
        FieldHelper.updateItems(districtFilter, region != null ? FacadeProvider.getDistrictFacade().getAllActiveByRegion(region.getUuid()) : null);
    });
    filterLayout.addComponent(regionFilter);
    districtFilter = ComboBoxHelper.createComboBoxV7();
    districtFilter.setId(FacilityDto.DISTRICT);
    districtFilter.setWidth(140, Unit.PIXELS);
    districtFilter.setCaption(I18nProperties.getPrefixCaption(FacilityDto.I18N_PREFIX, FacilityDto.DISTRICT));
    districtFilter.addValueChangeListener(e -> {
        DistrictReferenceDto district = (DistrictReferenceDto) e.getProperty().getValue();
        criteria.district(district);
        navigateTo(criteria);
        FieldHelper.updateItems(communityFilter, district != null ? FacadeProvider.getCommunityFacade().getAllActiveByDistrict(district.getUuid()) : null);
    });
    filterLayout.addComponent(districtFilter);
    communityFilter = ComboBoxHelper.createComboBoxV7();
    communityFilter.setId(FacilityDto.COMMUNITY);
    communityFilter.setWidth(140, Unit.PIXELS);
    communityFilter.setCaption(I18nProperties.getPrefixCaption(FacilityDto.I18N_PREFIX, FacilityDto.COMMUNITY));
    communityFilter.addValueChangeListener(e -> {
        criteria.community((CommunityReferenceDto) e.getProperty().getValue());
        navigateTo(criteria);
    });
    filterLayout.addComponent(communityFilter);
    resetButton = ButtonHelper.createButton(Captions.actionResetFilters, event -> {
        ViewModelProviders.of(FacilitiesView.class).remove(FacilityCriteria.class);
        navigateTo(null);
    }, CssStyles.FORCE_CAPTION);
    resetButton.setVisible(false);
    filterLayout.addComponent(resetButton);
    HorizontalLayout actionButtonsLayout = new HorizontalLayout();
    actionButtonsLayout.setSpacing(true);
    {
        // Show active/archived/all dropdown
        if (UserProvider.getCurrent().hasUserRight(UserRight.INFRASTRUCTURE_VIEW)) {
            relevanceStatusFilter = ComboBoxHelper.createComboBoxV7();
            relevanceStatusFilter.setId("relevanceStatus");
            relevanceStatusFilter.setWidth(220, Unit.PERCENTAGE);
            relevanceStatusFilter.setNullSelectionAllowed(false);
            relevanceStatusFilter.addItems((Object[]) EntityRelevanceStatus.values());
            relevanceStatusFilter.setItemCaption(EntityRelevanceStatus.ACTIVE, I18nProperties.getCaption(Captions.facilityActiveFacilities));
            relevanceStatusFilter.setItemCaption(EntityRelevanceStatus.ARCHIVED, I18nProperties.getCaption(Captions.facilityArchivedFacilities));
            relevanceStatusFilter.setItemCaption(EntityRelevanceStatus.ALL, I18nProperties.getCaption(Captions.facilityAllFacilities));
            relevanceStatusFilter.addValueChangeListener(e -> {
                criteria.relevanceStatus((EntityRelevanceStatus) e.getProperty().getValue());
                navigateTo(criteria);
            });
            actionButtonsLayout.addComponent(relevanceStatusFilter);
            // Bulk operation dropdown
            if (UserProvider.getCurrent().hasUserRight(UserRight.PERFORM_BULK_OPERATIONS)) {
                bulkOperationsDropdown = MenuBarHelper.createDropDown(Captions.bulkActions, new MenuBarHelper.MenuBarItem(I18nProperties.getCaption(Captions.actionArchiveInfrastructure), VaadinIcons.ARCHIVE, selectedItem -> {
                    ControllerProvider.getInfrastructureController().archiveOrDearchiveAllSelectedItems(true, grid.asMultiSelect().getSelectedItems(), InfrastructureType.FACILITY, new Runnable() {

                        public void run() {
                            navigateTo(criteria);
                        }
                    });
                }, EntityRelevanceStatus.ACTIVE.equals(criteria.getRelevanceStatus())), new MenuBarHelper.MenuBarItem(I18nProperties.getCaption(Captions.actionDearchiveInfrastructure), VaadinIcons.ARCHIVE, selectedItem -> {
                    ControllerProvider.getInfrastructureController().archiveOrDearchiveAllSelectedItems(false, grid.asMultiSelect().getSelectedItems(), InfrastructureType.FACILITY, new Runnable() {

                        public void run() {
                            navigateTo(criteria);
                        }
                    });
                }, EntityRelevanceStatus.ARCHIVED.equals(criteria.getRelevanceStatus())));
                bulkOperationsDropdown.setVisible(viewConfiguration.isInEagerMode() && !EntityRelevanceStatus.ALL.equals(criteria.getRelevanceStatus()));
                actionButtonsLayout.addComponent(bulkOperationsDropdown);
            }
        }
    }
    filterLayout.addComponent(actionButtonsLayout);
    filterLayout.setComponentAlignment(actionButtonsLayout, Alignment.BOTTOM_RIGHT);
    filterLayout.setExpandRatio(actionButtonsLayout, 1);
    return filterLayout;
}
Also used : RowCount(de.symeda.sormas.ui.utils.RowCount) FacilityDto(de.symeda.sormas.api.infrastructure.facility.FacilityDto) StreamResource(com.vaadin.server.StreamResource) SearchField(de.symeda.sormas.ui.configuration.infrastructure.components.SearchField) VaadinUiUtil(de.symeda.sormas.ui.utils.VaadinUiUtil) Date(java.util.Date) FacadeProvider(de.symeda.sormas.api.FacadeProvider) I18nProperties(de.symeda.sormas.api.i18n.I18nProperties) DateFormatHelper(de.symeda.sormas.ui.utils.DateFormatHelper) VerticalLayout(com.vaadin.ui.VerticalLayout) Alignment(com.vaadin.ui.Alignment) GridExportStreamResource(de.symeda.sormas.ui.utils.GridExportStreamResource) PopupButton(org.vaadin.hene.popupbutton.PopupButton) Window(com.vaadin.ui.Window) EntityRelevanceStatus(de.symeda.sormas.api.EntityRelevanceStatus) ControllerProvider(de.symeda.sormas.ui.ControllerProvider) ExportEntityName(de.symeda.sormas.ui.utils.ExportEntityName) ViewConfiguration(de.symeda.sormas.ui.utils.ViewConfiguration) CountryReferenceDto(de.symeda.sormas.api.infrastructure.country.CountryReferenceDto) ViewModelProviders(de.symeda.sormas.ui.ViewModelProviders) CssStyles(de.symeda.sormas.ui.utils.CssStyles) FacilityCriteria(de.symeda.sormas.api.infrastructure.facility.FacilityCriteria) MenuBarHelper(de.symeda.sormas.ui.utils.MenuBarHelper) ViewChangeEvent(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent) VaadinIcons(com.vaadin.icons.VaadinIcons) ComboBoxHelper(de.symeda.sormas.ui.utils.ComboBoxHelper) AbstractConfigurationView(de.symeda.sormas.ui.configuration.AbstractConfigurationView) UserProvider(de.symeda.sormas.ui.UserProvider) ButtonHelper(de.symeda.sormas.ui.utils.ButtonHelper) ValoTheme(com.vaadin.ui.themes.ValoTheme) DownloadUtil(de.symeda.sormas.ui.utils.DownloadUtil) MenuBar(com.vaadin.ui.MenuBar) ComboBox(com.vaadin.v7.ui.ComboBox) DistrictReferenceDto(de.symeda.sormas.api.infrastructure.district.DistrictReferenceDto) FacilityType(de.symeda.sormas.api.infrastructure.facility.FacilityType) InfrastructureType(de.symeda.sormas.api.infrastructure.InfrastructureType) FieldHelper(de.symeda.sormas.ui.utils.FieldHelper) Captions(de.symeda.sormas.api.i18n.Captions) CommunityReferenceDto(de.symeda.sormas.api.infrastructure.community.CommunityReferenceDto) UserRight(de.symeda.sormas.api.user.UserRight) Button(com.vaadin.ui.Button) HorizontalLayout(com.vaadin.ui.HorizontalLayout) FacilityExportDto(de.symeda.sormas.api.infrastructure.facility.FacilityExportDto) FacilityTypeGroup(de.symeda.sormas.api.infrastructure.facility.FacilityTypeGroup) Strings(de.symeda.sormas.api.i18n.Strings) RegionReferenceDto(de.symeda.sormas.api.infrastructure.region.RegionReferenceDto) SearchField(de.symeda.sormas.ui.configuration.infrastructure.components.SearchField) MenuBarHelper(de.symeda.sormas.ui.utils.MenuBarHelper) RegionReferenceDto(de.symeda.sormas.api.infrastructure.region.RegionReferenceDto) CountryReferenceDto(de.symeda.sormas.api.infrastructure.country.CountryReferenceDto) EntityRelevanceStatus(de.symeda.sormas.api.EntityRelevanceStatus) FacilityCriteria(de.symeda.sormas.api.infrastructure.facility.FacilityCriteria) FacilityTypeGroup(de.symeda.sormas.api.infrastructure.facility.FacilityTypeGroup) DistrictReferenceDto(de.symeda.sormas.api.infrastructure.district.DistrictReferenceDto) HorizontalLayout(com.vaadin.ui.HorizontalLayout)

Example 19 with HorizontalLayout

use of com.vaadin.v7.ui.HorizontalLayout in project SORMAS-Project by hzi-braunschweig.

the class CasePickOrImportField method addInfoComponent.

@Override
protected void addInfoComponent() {
    HorizontalLayout infoLayout = new HorizontalLayout();
    infoLayout.setWidth(100, Unit.PERCENTAGE);
    infoLayout.setSpacing(true);
    Image icon = new Image(null, new ThemeResource("img/info-icon.png"));
    icon.setHeight(35, Unit.PIXELS);
    icon.setWidth(35, Unit.PIXELS);
    infoLayout.addComponent(icon);
    Label infoLabel = new Label(I18nProperties.getString(Strings.infoImportSimilarity));
    infoLayout.addComponent(infoLabel);
    infoLayout.setExpandRatio(infoLabel, 1);
    mainLayout.addComponent(infoLayout);
    CssStyles.style(infoLayout, CssStyles.VSPACE_3);
    // Imported case info
    VerticalLayout caseInfoContainer = new VerticalLayout();
    caseInfoContainer.setWidth(100, Unit.PERCENTAGE);
    CssStyles.style(caseInfoContainer, CssStyles.BACKGROUND_ROUNDED_CORNERS, CssStyles.BACKGROUND_SUB_CRITERIA, CssStyles.VSPACE_3, "v-scrollable");
    Label newCaseLabel = new Label(I18nProperties.getString(Strings.headingImportedCaseInfo));
    CssStyles.style(newCaseLabel, CssStyles.LABEL_BOLD, CssStyles.VSPACE_4);
    caseInfoContainer.addComponent(newCaseLabel);
    HorizontalLayout caseInfoLayout = new HorizontalLayout();
    caseInfoLayout.setSpacing(true);
    caseInfoLayout.setSizeUndefined();
    {
        Label diseaseField = new Label();
        diseaseField.setCaption(I18nProperties.getPrefixCaption(CaseDataDto.I18N_PREFIX, CaseDataDto.DISEASE));
        diseaseField.setValue(DiseaseHelper.toString(newCase.getDisease(), newCase.getDiseaseDetails()));
        diseaseField.setWidthUndefined();
        caseInfoLayout.addComponent(diseaseField);
        Label reportDateField = new Label();
        reportDateField.setCaption(I18nProperties.getPrefixCaption(CaseDataDto.I18N_PREFIX, CaseDataDto.REPORT_DATE));
        reportDateField.setValue(DateFormatHelper.formatDate(newCase.getReportDate()));
        reportDateField.setWidthUndefined();
        caseInfoLayout.addComponent(reportDateField);
        Label responsibleRegionField = new Label();
        responsibleRegionField.setCaption(I18nProperties.getPrefixCaption(CaseDataDto.I18N_PREFIX, CaseDataDto.RESPONSIBLE_REGION));
        responsibleRegionField.setValue(newCase.getResponsibleRegion().toString());
        responsibleRegionField.setWidthUndefined();
        caseInfoLayout.addComponent(responsibleRegionField);
        Label responsibleDistrictField = new Label();
        responsibleDistrictField.setCaption(I18nProperties.getPrefixCaption(CaseDataDto.I18N_PREFIX, CaseDataDto.RESPONSIBLE_DISTRICT));
        responsibleDistrictField.setValue(newCase.getResponsibleDistrict().toString());
        responsibleDistrictField.setWidthUndefined();
        caseInfoLayout.addComponent(responsibleDistrictField);
        if (newCase.getRegion() != null) {
            Label regionField = new Label();
            regionField.setCaption(I18nProperties.getPrefixCaption(CaseDataDto.I18N_PREFIX, CaseDataDto.REGION));
            regionField.setValue(newCase.getRegion().toString());
            regionField.setWidthUndefined();
            caseInfoLayout.addComponent(regionField);
        }
        if (newCase.getDistrict() != null) {
            Label districtField = new Label();
            districtField.setCaption(I18nProperties.getPrefixCaption(CaseDataDto.I18N_PREFIX, CaseDataDto.DISTRICT));
            districtField.setValue(newCase.getDistrict().toString());
            districtField.setWidthUndefined();
            caseInfoLayout.addComponent(districtField);
        }
        Label facilityField = new Label();
        facilityField.setCaption(I18nProperties.getPrefixCaption(CaseDataDto.I18N_PREFIX, CaseDataDto.HEALTH_FACILITY));
        facilityField.setValue(FacilityHelper.buildFacilityString(null, newCase.getHealthFacility() != null ? newCase.getHealthFacility().toString() : "", newCase.getHealthFacilityDetails()));
        facilityField.setWidthUndefined();
        caseInfoLayout.addComponent(facilityField);
        Label firstNameField = new Label();
        firstNameField.setCaption(I18nProperties.getPrefixCaption(PersonDto.I18N_PREFIX, PersonDto.FIRST_NAME));
        firstNameField.setValue(newPerson.getFirstName());
        firstNameField.setWidthUndefined();
        caseInfoLayout.addComponent(firstNameField);
        Label lastNameField = new Label();
        lastNameField.setCaption(I18nProperties.getPrefixCaption(PersonDto.I18N_PREFIX, PersonDto.LAST_NAME));
        lastNameField.setValue(newPerson.getLastName());
        lastNameField.setWidthUndefined();
        caseInfoLayout.addComponent(lastNameField);
        Label ageAndBirthDateField = new Label();
        ageAndBirthDateField.setCaption(I18nProperties.getCaption(Captions.personAgeAndBirthdate));
        ageAndBirthDateField.setValue(PersonHelper.getAgeAndBirthdateString(newPerson.getApproximateAge(), newPerson.getApproximateAgeType(), newPerson.getBirthdateDD(), newPerson.getBirthdateMM(), newPerson.getBirthdateYYYY()));
        ageAndBirthDateField.setWidthUndefined();
        caseInfoLayout.addComponent(ageAndBirthDateField);
        Label sexField = new Label();
        sexField.setCaption(I18nProperties.getPrefixCaption(PersonDto.I18N_PREFIX, PersonDto.SEX));
        sexField.setValue(newPerson.getSex() != null ? newPerson.getSex().toString() : "");
        sexField.setWidthUndefined();
        caseInfoLayout.addComponent(sexField);
    }
    caseInfoContainer.addComponent(caseInfoLayout);
    mainLayout.addComponent(caseInfoContainer);
}
Also used : Label(com.vaadin.v7.ui.Label) ThemeResource(com.vaadin.server.ThemeResource) VerticalLayout(com.vaadin.ui.VerticalLayout) Image(com.vaadin.ui.Image) HorizontalLayout(com.vaadin.ui.HorizontalLayout)

Example 20 with HorizontalLayout

use of com.vaadin.v7.ui.HorizontalLayout in project SORMAS-Project by hzi-braunschweig.

the class CasesView method createStatusFilterBar.

public HorizontalLayout createStatusFilterBar() {
    HorizontalLayout statusFilterLayout = new HorizontalLayout();
    statusFilterLayout.setSpacing(true);
    statusFilterLayout.setMargin(false);
    statusFilterLayout.setWidth(100, Unit.PERCENTAGE);
    statusFilterLayout.addStyleName(CssStyles.VSPACE_3);
    statusButtons = new HashMap<>();
    Button statusAll = ButtonHelper.createButton(Captions.all, e -> {
        criteria.investigationStatus(null);
        navigateTo(criteria);
    }, ValoTheme.BUTTON_BORDERLESS, CssStyles.BUTTON_FILTER);
    statusAll.setCaptionAsHtml(true);
    statusFilterLayout.addComponent(statusAll);
    statusButtons.put(statusAll, I18nProperties.getCaption(Captions.all));
    activeStatusButton = statusAll;
    for (InvestigationStatus status : InvestigationStatus.values()) {
        Button statusButton = ButtonHelper.createButton(status.toString(), e -> {
            criteria.investigationStatus(status);
            navigateTo(criteria);
        }, ValoTheme.BUTTON_BORDERLESS, CssStyles.BUTTON_FILTER, CssStyles.BUTTON_FILTER_LIGHT);
        statusButton.setData(status);
        statusButton.setCaptionAsHtml(true);
        statusFilterLayout.addComponent(statusButton);
        statusButtons.put(statusButton, status.toString());
    }
    HorizontalLayout actionButtonsLayout = new HorizontalLayout();
    actionButtonsLayout.setSpacing(true);
    {
        // Show active/archived/all dropdown
        if (Objects.nonNull(UserProvider.getCurrent()) && UserProvider.getCurrent().hasUserRight(UserRight.CASE_VIEW)) {
            if (FacadeProvider.getFeatureConfigurationFacade().isFeatureEnabled(FeatureType.AUTOMATIC_ARCHIVING, CoreEntityType.CASE)) {
                int daysAfterCaseGetsArchived = FacadeProvider.getFeatureConfigurationFacade().getProperty(FeatureType.AUTOMATIC_ARCHIVING, CoreEntityType.CASE, FeatureTypeProperty.THRESHOLD_IN_DAYS, Integer.class);
                if (daysAfterCaseGetsArchived > 0) {
                    relevanceStatusInfoLabel = new Label(VaadinIcons.INFO_CIRCLE.getHtml() + " " + String.format(I18nProperties.getString(Strings.infoArchivedCases), daysAfterCaseGetsArchived), ContentMode.HTML);
                    relevanceStatusInfoLabel.setVisible(false);
                    relevanceStatusInfoLabel.addStyleName(CssStyles.LABEL_VERTICAL_ALIGN_SUPER);
                    actionButtonsLayout.addComponent(relevanceStatusInfoLabel);
                    actionButtonsLayout.setComponentAlignment(relevanceStatusInfoLabel, Alignment.MIDDLE_RIGHT);
                }
            }
            relevanceStatusFilter = ComboBoxHelper.createComboBoxV7();
            relevanceStatusFilter.setId("relevanceStatus");
            relevanceStatusFilter.setWidth(140, Unit.PIXELS);
            relevanceStatusFilter.setNullSelectionAllowed(false);
            relevanceStatusFilter.addItems((Object[]) EntityRelevanceStatus.values());
            relevanceStatusFilter.setItemCaption(EntityRelevanceStatus.ACTIVE, I18nProperties.getCaption(Captions.caseActiveCases));
            relevanceStatusFilter.setItemCaption(EntityRelevanceStatus.ARCHIVED, I18nProperties.getCaption(Captions.caseArchivedCases));
            relevanceStatusFilter.setItemCaption(EntityRelevanceStatus.ALL, I18nProperties.getCaption(Captions.caseAllCases));
            relevanceStatusFilter.addValueChangeListener(e -> {
                if (relevanceStatusInfoLabel != null) {
                    relevanceStatusInfoLabel.setVisible(EntityRelevanceStatus.ARCHIVED.equals(e.getProperty().getValue()));
                }
                criteria.relevanceStatus((EntityRelevanceStatus) e.getProperty().getValue());
                navigateTo(criteria);
            });
            actionButtonsLayout.addComponent(relevanceStatusFilter);
        }
        if (viewConfiguration.getViewType().isCaseOverview()) {
            AbstractCaseGrid<?> caseGrid = (AbstractCaseGrid<?>) this.grid;
            // Bulk operation dropdown
            if (isBulkEditAllowed()) {
                boolean hasBulkOperationsRight = UserProvider.getCurrent().hasUserRight(UserRight.PERFORM_BULK_OPERATIONS_CASE_SAMPLES);
                final List<MenuBarHelper.MenuBarItem> menuBarItems = new ArrayList<>();
                menuBarItems.add(new MenuBarHelper.MenuBarItem(I18nProperties.getCaption(Captions.bulkEdit), VaadinIcons.ELLIPSIS_H, mi -> {
                    grid.bulkActionHandler(items -> ControllerProvider.getCaseController().showBulkCaseDataEditComponent(items));
                }, hasBulkOperationsRight));
                menuBarItems.add(new MenuBarHelper.MenuBarItem(I18nProperties.getCaption(Captions.bulkDelete), VaadinIcons.TRASH, mi -> {
                    grid.bulkActionHandler(items -> ControllerProvider.getCaseController().deleteAllSelectedItems(items, () -> navigateTo(criteria)), true);
                }, hasBulkOperationsRight));
                final boolean externalMessagesEnabled = FacadeProvider.getFeatureConfigurationFacade().isFeatureEnabled(FeatureType.MANUAL_EXTERNAL_MESSAGES);
                final boolean isSmsServiceSetUp = FacadeProvider.getConfigFacade().isSmsServiceSetUp();
                if (isSmsServiceSetUp && externalMessagesEnabled && UserProvider.getCurrent().hasUserRight(UserRight.SEND_MANUAL_EXTERNAL_MESSAGES)) {
                    menuBarItems.add(new MenuBarHelper.MenuBarItem(I18nProperties.getCaption(Captions.messagesSendSMS), VaadinIcons.MOBILE_RETRO, mi -> {
                        grid.bulkActionHandler(items -> ControllerProvider.getCaseController().sendSmsToAllSelectedItems(items, () -> navigateTo(criteria)));
                    }, hasBulkOperationsRight));
                }
                menuBarItems.add(new MenuBarHelper.MenuBarItem(I18nProperties.getCaption(Captions.actionArchiveCoreEntity), VaadinIcons.ARCHIVE, mi -> {
                    grid.bulkActionHandler(items -> ControllerProvider.getCaseController().archiveAllSelectedItems(items, () -> navigateTo(criteria, true)), true);
                }, hasBulkOperationsRight && EntityRelevanceStatus.ACTIVE.equals(criteria.getRelevanceStatus())));
                menuBarItems.add(new MenuBarHelper.MenuBarItem(I18nProperties.getCaption(Captions.actionDearchiveCoreEntity), VaadinIcons.ARCHIVE, mi -> {
                    grid.bulkActionHandler(items -> ControllerProvider.getCaseController().dearchiveAllSelectedItems(items, () -> navigateTo(criteria, true)), true);
                }, hasBulkOperationsRight && EntityRelevanceStatus.ARCHIVED.equals(criteria.getRelevanceStatus())));
                menuBarItems.add(new MenuBarHelper.MenuBarItem(I18nProperties.getCaption(Captions.sormasToSormasShare), VaadinIcons.SHARE, mi -> {
                    grid.bulkActionHandler(items -> ControllerProvider.getSormasToSormasController().shareSelectedCases(items, () -> navigateTo(criteria)));
                }, FacadeProvider.getSormasToSormasFacade().isSharingCasesContactsAndSamplesEnabledForUser()));
                menuBarItems.add(new MenuBarHelper.MenuBarItem(I18nProperties.getCaption(Captions.ExternalSurveillanceToolGateway_send), VaadinIcons.SHARE, mi -> {
                    grid.bulkActionHandler(items -> ControllerProvider.getCaseController().sendCasesToExternalSurveillanceTool(items, () -> navigateTo(criteria)));
                }, FacadeProvider.getExternalSurveillanceToolFacade().isFeatureEnabled()));
                if (isDocGenerationAllowed()) {
                    menuBarItems.add(new MenuBarHelper.MenuBarItem(I18nProperties.getCaption(Captions.bulkActionCreatDocuments), VaadinIcons.FILE_TEXT, mi -> {
                        grid.bulkActionHandler(items -> {
                            List<ReferenceDto> references = caseGrid.asMultiSelect().getSelectedItems().stream().map(CaseIndexDto::toReference).collect(Collectors.toList());
                            if (references.size() == 0) {
                                new Notification(I18nProperties.getString(Strings.headingNoCasesSelected), I18nProperties.getString(Strings.messageNoCasesSelected), Notification.Type.WARNING_MESSAGE, false).show(Page.getCurrent());
                                return;
                            }
                            ControllerProvider.getDocGenerationController().showBulkQuarantineOrderDocumentDialog(references, DocumentWorkflow.QUARANTINE_ORDER_CASE);
                        });
                    }));
                }
                if (FacadeProvider.getFeatureConfigurationFacade().isFeatureEnabled(FeatureType.EVENT_SURVEILLANCE)) {
                    menuBarItems.add(new MenuBarHelper.MenuBarItem(I18nProperties.getCaption(Captions.bulkLinkToEvent), VaadinIcons.PHONE, mi -> grid.bulkActionHandler(items -> {
                        List<CaseIndexDto> selectedCases = caseGrid.asMultiSelect().getSelectedItems().stream().collect(Collectors.toList());
                        if (selectedCases.isEmpty()) {
                            new Notification(I18nProperties.getString(Strings.headingNoCasesSelected), I18nProperties.getString(Strings.messageNoCasesSelected), Notification.Type.WARNING_MESSAGE, false).show(Page.getCurrent());
                            return;
                        }
                        if (!selectedCases.stream().allMatch(caze -> caze.getDisease().equals(selectedCases.stream().findAny().get().getDisease()))) {
                            new Notification(I18nProperties.getString(Strings.messageBulkCasesWithDifferentDiseasesSelected), Notification.Type.WARNING_MESSAGE).show(Page.getCurrent());
                            return;
                        }
                        ControllerProvider.getEventController().selectOrCreateEventForCaseList(selectedCases.stream().map(CaseIndexDto::toReference).collect(Collectors.toList()));
                    })));
                }
                bulkOperationsDropdown = MenuBarHelper.createDropDown(Captions.bulkActions, menuBarItems);
                bulkOperationsDropdown.setVisible(viewConfiguration.isInEagerMode());
                actionButtonsLayout.addComponent(bulkOperationsDropdown);
            }
        }
    }
    statusFilterLayout.addComponent(actionButtonsLayout);
    statusFilterLayout.setComponentAlignment(actionButtonsLayout, Alignment.TOP_RIGHT);
    statusFilterLayout.setExpandRatio(actionButtonsLayout, 1);
    return statusFilterLayout;
}
Also used : FeatureType(de.symeda.sormas.api.feature.FeatureType) CaseImportLayout(de.symeda.sormas.ui.caze.importer.CaseImportLayout) TextField(com.vaadin.ui.TextField) Date(java.util.Date) DocumentWorkflow(de.symeda.sormas.api.docgeneneration.DocumentWorkflow) I18nProperties(de.symeda.sormas.api.i18n.I18nProperties) Alignment(com.vaadin.ui.Alignment) UI(com.vaadin.ui.UI) ReferenceDto(de.symeda.sormas.api.ReferenceDto) Window(com.vaadin.ui.Window) PersonDto(de.symeda.sormas.api.person.PersonDto) ControllerProvider(de.symeda.sormas.ui.ControllerProvider) ExportEntityName(de.symeda.sormas.ui.utils.ExportEntityName) ViewModelProviders(de.symeda.sormas.ui.ViewModelProviders) CssStyles(de.symeda.sormas.ui.utils.CssStyles) ExpandableButton(de.symeda.sormas.ui.utils.components.expandablebutton.ExpandableButton) MenuBarHelper(de.symeda.sormas.ui.utils.MenuBarHelper) Page(com.vaadin.server.Page) ViewChangeEvent(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent) VaadinIcons(com.vaadin.icons.VaadinIcons) ComboBoxHelper(de.symeda.sormas.ui.utils.ComboBoxHelper) UserProvider(de.symeda.sormas.ui.UserProvider) ValoTheme(com.vaadin.ui.themes.ValoTheme) DownloadUtil(de.symeda.sormas.ui.utils.DownloadUtil) FilteredGrid(de.symeda.sormas.ui.utils.FilteredGrid) DateField(com.vaadin.ui.DateField) MenuBar(com.vaadin.ui.MenuBar) CaseCriteria(de.symeda.sormas.api.caze.CaseCriteria) ComboBox(com.vaadin.v7.ui.ComboBox) ExportType(de.symeda.sormas.api.importexport.ExportType) Set(java.util.Set) CaseDataDto(de.symeda.sormas.api.caze.CaseDataDto) InvestigationStatus(de.symeda.sormas.api.caze.InvestigationStatus) Collectors(java.util.stream.Collectors) Objects(java.util.Objects) CaseIndexDto(de.symeda.sormas.api.caze.CaseIndexDto) ExportConfigurationDto(de.symeda.sormas.api.importexport.ExportConfigurationDto) List(java.util.List) LocalDate(java.time.LocalDate) CoreEntityType(de.symeda.sormas.api.common.CoreEntityType) DateHelper8(de.symeda.sormas.ui.utils.DateHelper8) ExportConfigurationsLayout(de.symeda.sormas.ui.customexport.ExportConfigurationsLayout) FollowUpUtils.createFollowUpLegend(de.symeda.sormas.ui.utils.FollowUpUtils.createFollowUpLegend) StreamResource(com.vaadin.server.StreamResource) VaadinUiUtil(de.symeda.sormas.ui.utils.VaadinUiUtil) SearchSpecificLayout(de.symeda.sormas.ui.SearchSpecificLayout) FacadeProvider(de.symeda.sormas.api.FacadeProvider) DateFormatHelper(de.symeda.sormas.ui.utils.DateFormatHelper) VerticalLayout(com.vaadin.ui.VerticalLayout) DateHelper(de.symeda.sormas.api.utils.DateHelper) GridExportStreamResource(de.symeda.sormas.ui.utils.GridExportStreamResource) HashMap(java.util.HashMap) PopupButton(org.vaadin.hene.popupbutton.PopupButton) EntityRelevanceStatus(de.symeda.sormas.api.EntityRelevanceStatus) AdditionalTestDto(de.symeda.sormas.api.sample.AdditionalTestDto) PopupMenu(de.symeda.sormas.ui.utils.components.popupmenu.PopupMenu) Supplier(java.util.function.Supplier) ArrayList(java.util.ArrayList) CaseExportType(de.symeda.sormas.api.caze.CaseExportType) OptionGroup(com.vaadin.v7.ui.OptionGroup) Notification(com.vaadin.ui.Notification) SormasUI(de.symeda.sormas.ui.SormasUI) Label(com.vaadin.ui.Label) CountryHelper(de.symeda.sormas.api.CountryHelper) AbstractView(de.symeda.sormas.ui.utils.AbstractView) CaseDownloadUtil(de.symeda.sormas.ui.utils.CaseDownloadUtil) ButtonHelper(de.symeda.sormas.ui.utils.ButtonHelper) ContentMode(com.vaadin.shared.ui.ContentMode) Validations(de.symeda.sormas.api.i18n.Validations) LineListingImportLayout(de.symeda.sormas.ui.caze.importer.LineListingImportLayout) BAGExportCaseDto(de.symeda.sormas.api.bagexport.BAGExportCaseDto) Captions(de.symeda.sormas.api.i18n.Captions) UserRight(de.symeda.sormas.api.user.UserRight) Button(com.vaadin.ui.Button) LayoutUtil(de.symeda.sormas.ui.utils.LayoutUtil) SampleExportDto(de.symeda.sormas.api.sample.SampleExportDto) ImportExportUtils(de.symeda.sormas.api.importexport.ImportExportUtils) SampleDto(de.symeda.sormas.api.sample.SampleDto) HorizontalLayout(com.vaadin.ui.HorizontalLayout) FeatureTypeProperty(de.symeda.sormas.api.feature.FeatureTypeProperty) Strings(de.symeda.sormas.api.i18n.Strings) ExportPropertyMetaInfo(de.symeda.sormas.api.importexport.ExportPropertyMetaInfo) DocGenerationHelper.isDocGenerationAllowed(de.symeda.sormas.ui.docgeneration.DocGenerationHelper.isDocGenerationAllowed) Collections(java.util.Collections) Component(com.vaadin.ui.Component) ReferenceDto(de.symeda.sormas.api.ReferenceDto) Label(com.vaadin.ui.Label) EntityRelevanceStatus(de.symeda.sormas.api.EntityRelevanceStatus) Notification(com.vaadin.ui.Notification) HorizontalLayout(com.vaadin.ui.HorizontalLayout) MenuBarHelper(de.symeda.sormas.ui.utils.MenuBarHelper) ExpandableButton(de.symeda.sormas.ui.utils.components.expandablebutton.ExpandableButton) PopupButton(org.vaadin.hene.popupbutton.PopupButton) Button(com.vaadin.ui.Button) List(java.util.List) ArrayList(java.util.ArrayList) InvestigationStatus(de.symeda.sormas.api.caze.InvestigationStatus)

Aggregations

HorizontalLayout (com.vaadin.ui.HorizontalLayout)53 Button (com.vaadin.ui.Button)37 Label (com.vaadin.ui.Label)32 VerticalLayout (com.vaadin.ui.VerticalLayout)32 ComboBox (com.vaadin.v7.ui.ComboBox)29 I18nProperties (de.symeda.sormas.api.i18n.I18nProperties)29 CssStyles (de.symeda.sormas.ui.utils.CssStyles)29 Alignment (com.vaadin.ui.Alignment)28 ValoTheme (com.vaadin.ui.themes.ValoTheme)28 Captions (de.symeda.sormas.api.i18n.Captions)28 ButtonHelper (de.symeda.sormas.ui.utils.ButtonHelper)27 FacadeProvider (de.symeda.sormas.api.FacadeProvider)26 Strings (de.symeda.sormas.api.i18n.Strings)26 VaadinIcons (com.vaadin.icons.VaadinIcons)25 UserProvider (de.symeda.sormas.ui.UserProvider)25 ControllerProvider (de.symeda.sormas.ui.ControllerProvider)24 ComboBoxHelper (de.symeda.sormas.ui.utils.ComboBoxHelper)23 MenuBar (com.vaadin.ui.MenuBar)22 UserRight (de.symeda.sormas.api.user.UserRight)22 ViewModelProviders (de.symeda.sormas.ui.ViewModelProviders)22