Search in sources :

Example 46 with VerticalLayout

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

the class SmsComponent method initContent.

@Override
protected Component initContent() {
    final VerticalLayout mainLayout = new VerticalLayout();
    mainLayout.setSpacing(false);
    mainLayout.setMargin(false);
    mainLayout.setSizeUndefined();
    mainLayout.setWidth(100, Unit.PERCENTAGE);
    if (missingPhoneNumbers > 0) {
        mainLayout.addComponent(new Label(VaadinIcons.INFO_CIRCLE.getHtml() + " " + String.format(I18nProperties.getCaption(Captions.messagesNumberOfMissingPhoneNumbers), missingPhoneNumbers), ContentMode.HTML));
        mainLayout.addComponent(new Label());
    }
    mainLayout.addComponent(new Label(I18nProperties.getString(Strings.messageEnterSms)));
    final ResizableTextAreaWrapper<TextArea> resizableTextAreaWrapper = new ResizableTextAreaWrapper<>();
    smsTextArea = new TextArea();
    smsTextArea.setWidth(100, Unit.PERCENTAGE);
    smsTextArea.setRows(4);
    mainLayout.addComponent(resizableTextAreaWrapper.wrap(smsTextArea, Captions.messagesCharacters, false));
    final Label numberOfMessagesLabel = new Label(String.format(I18nProperties.getCaption(Captions.messagesNumberOfMessages), 0));
    numberOfMessagesLabel.addStyleNames(CssStyles.ALIGN_RIGHT, CssStyles.FIELD_EXTRA_INFO, CssStyles.LABEL_ITALIC);
    mainLayout.addComponent(numberOfMessagesLabel);
    mainLayout.setComponentAlignment(numberOfMessagesLabel, Alignment.BOTTOM_RIGHT);
    smsTextArea.addTextChangeListener(e -> setNumberOfMessagesLabel(numberOfMessagesLabel, e.getText().length()));
    smsTextArea.addValueChangeListener(e -> setNumberOfMessagesLabel(numberOfMessagesLabel, smsTextArea.getValue().length()));
    return mainLayout;
}
Also used : TextArea(com.vaadin.v7.ui.TextArea) Label(com.vaadin.ui.Label) VerticalLayout(com.vaadin.ui.VerticalLayout) ResizableTextAreaWrapper(de.symeda.sormas.ui.utils.ResizableTextAreaWrapper)

Example 47 with VerticalLayout

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

the class TherapyView method createPrescriptionsHeader.

private VerticalLayout createPrescriptionsHeader() {
    VerticalLayout prescriptionsHeader = new VerticalLayout();
    prescriptionsHeader.setMargin(false);
    prescriptionsHeader.setSpacing(false);
    prescriptionsHeader.setWidth(100, Unit.PERCENTAGE);
    HorizontalLayout headlineRow = new HorizontalLayout();
    headlineRow.setMargin(false);
    headlineRow.setSpacing(true);
    headlineRow.setWidth(100, Unit.PERCENTAGE);
    {
        Label prescriptionsLabel = new Label(I18nProperties.getString(Strings.entityPrescriptions));
        CssStyles.style(prescriptionsLabel, CssStyles.H3);
        headlineRow.addComponent(prescriptionsLabel);
        headlineRow.setExpandRatio(prescriptionsLabel, 1);
        // Bulk operations
        if (UserProvider.getCurrent().hasUserRight(UserRight.PERFORM_BULK_OPERATIONS)) {
            MenuBar bulkOperationsDropdown = MenuBarHelper.createDropDown(Captions.bulkActions, new MenuBarHelper.MenuBarItem(I18nProperties.getCaption(Captions.bulkDelete), VaadinIcons.TRASH, selectedItem -> {
                ControllerProvider.getTherapyController().deleteAllSelectedPrescriptions(prescriptionGrid.getSelectedRows(), new Runnable() {

                    public void run() {
                        reloadPrescriptionGrid();
                    }
                });
            }));
            headlineRow.addComponent(bulkOperationsDropdown);
            headlineRow.setComponentAlignment(bulkOperationsDropdown, Alignment.MIDDLE_RIGHT);
        }
        Button newPrescriptionButton = ButtonHelper.createButton(Captions.prescriptionNewPrescription, e -> {
            ControllerProvider.getTherapyController().openPrescriptionCreateForm(prescriptionCriteria.getTherapy(), this::reloadPrescriptionGrid);
        }, ValoTheme.BUTTON_PRIMARY);
        headlineRow.addComponent(newPrescriptionButton);
        headlineRow.setComponentAlignment(newPrescriptionButton, Alignment.MIDDLE_RIGHT);
    }
    prescriptionsHeader.addComponent(headlineRow);
    HorizontalLayout filterRow = new HorizontalLayout();
    filterRow.setMargin(false);
    filterRow.setSpacing(true);
    {
        prescriptionTypeFilter = ComboBoxHelper.createComboBoxV7();
        prescriptionTypeFilter.setWidth(140, Unit.PIXELS);
        prescriptionTypeFilter.setInputPrompt(I18nProperties.getPrefixCaption(PrescriptionDto.I18N_PREFIX, PrescriptionDto.PRESCRIPTION_TYPE));
        prescriptionTypeFilter.addItems((Object[]) TreatmentType.values());
        prescriptionTypeFilter.addValueChangeListener(e -> {
            prescriptionCriteria.prescriptionType(((TreatmentType) e.getProperty().getValue()));
            navigateTo(prescriptionCriteria);
        });
        filterRow.addComponent(prescriptionTypeFilter);
        prescriptionTextFilter = new TextField();
        prescriptionTextFilter.setWidth(300, Unit.PIXELS);
        prescriptionTextFilter.setNullRepresentation("");
        prescriptionTextFilter.setInputPrompt(I18nProperties.getString(Strings.promptPrescriptionTextFilter));
        prescriptionTextFilter.addTextChangeListener(e -> {
            prescriptionCriteria.textFilter(e.getText());
            reloadPrescriptionGrid();
        });
        filterRow.addComponent(prescriptionTextFilter);
    }
    prescriptionsHeader.addComponent(filterRow);
    return prescriptionsHeader;
}
Also used : TreatmentType(de.symeda.sormas.api.therapy.TreatmentType) FacadeProvider(de.symeda.sormas.api.FacadeProvider) I18nProperties(de.symeda.sormas.api.i18n.I18nProperties) VerticalLayout(com.vaadin.ui.VerticalLayout) Alignment(com.vaadin.ui.Alignment) DetailSubComponentWrapper(de.symeda.sormas.ui.utils.DetailSubComponentWrapper) ControllerProvider(de.symeda.sormas.ui.ControllerProvider) AbstractCaseView(de.symeda.sormas.ui.caze.AbstractCaseView) ViewModelProviders(de.symeda.sormas.ui.ViewModelProviders) CssStyles(de.symeda.sormas.ui.utils.CssStyles) TreatmentCriteria(de.symeda.sormas.api.therapy.TreatmentCriteria) MenuBarHelper(de.symeda.sormas.ui.utils.MenuBarHelper) Label(com.vaadin.ui.Label) VaadinIcons(com.vaadin.icons.VaadinIcons) ComboBoxHelper(de.symeda.sormas.ui.utils.ComboBoxHelper) UserProvider(de.symeda.sormas.ui.UserProvider) ButtonHelper(de.symeda.sormas.ui.utils.ButtonHelper) ValoTheme(com.vaadin.ui.themes.ValoTheme) PrescriptionDto(de.symeda.sormas.api.therapy.PrescriptionDto) TherapyDto(de.symeda.sormas.api.therapy.TherapyDto) MenuBar(com.vaadin.ui.MenuBar) ComboBox(com.vaadin.v7.ui.ComboBox) CaseDataDto(de.symeda.sormas.api.caze.CaseDataDto) Captions(de.symeda.sormas.api.i18n.Captions) UserRight(de.symeda.sormas.api.user.UserRight) Button(com.vaadin.ui.Button) PrescriptionCriteria(de.symeda.sormas.api.therapy.PrescriptionCriteria) HeightMode(com.vaadin.v7.shared.ui.grid.HeightMode) HorizontalLayout(com.vaadin.ui.HorizontalLayout) TextField(com.vaadin.v7.ui.TextField) Strings(de.symeda.sormas.api.i18n.Strings) TreatmentDto(de.symeda.sormas.api.therapy.TreatmentDto) Button(com.vaadin.ui.Button) Label(com.vaadin.ui.Label) VerticalLayout(com.vaadin.ui.VerticalLayout) MenuBar(com.vaadin.ui.MenuBar) TextField(com.vaadin.v7.ui.TextField) HorizontalLayout(com.vaadin.ui.HorizontalLayout)

Example 48 with VerticalLayout

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

the class VisitEditForm method addFields.

@Override
protected void addFields() {
    if (disease == null) {
        // workaround to stop initialization until disease is set
        return;
    }
    VerticalLayout layoutPhoneLink = new VerticalLayout();
    layoutPhoneLink.setSpacing(false);
    layoutPhoneLink.setMargin(false);
    layoutPhoneLink.setWidth(100, Unit.PERCENTAGE);
    Label labelPhoneLink = new Label((I18nProperties.getCaption(Captions.contactPersonPhoneNumber)));
    labelPhoneLink.setPrimaryStyleName("v-caption");
    layoutPhoneLink.addComponent(labelPhoneLink);
    Link linkPhone = new Link(this.person.getPhone(), new ExternalResource(PHONE_LINK_PREFIX + this.person.getPhone()));
    linkPhone.setWidth(100, Unit.PERCENTAGE);
    layoutPhoneLink.addComponent(linkPhone);
    getContent().addComponent(layoutPhoneLink, CONTACT_PERSON_PHONE_NUMBER_LOC);
    addField(VisitDto.VISIT_DATE_TIME, DateTimeField.class);
    NullableOptionGroup visitStatus = addField(VisitDto.VISIT_STATUS, NullableOptionGroup.class);
    addField(VisitDto.VISIT_REMARKS, TextField.class).setDescription(I18nProperties.getPrefixDescription(VisitDto.I18N_PREFIX, VisitDto.VISIT_REMARKS) + "\n" + I18nProperties.getDescription(Descriptions.descGdpr));
    symptomsForm = new SymptomsForm(null, disease, person, SymptomsContext.VISIT, null, fieldAccessCheckers);
    getFieldGroup().bind(symptomsForm, VisitDto.SYMPTOMS);
    getContent().addComponent(symptomsForm, VisitDto.SYMPTOMS);
    setRequired(true, VisitDto.VISIT_DATE_TIME, VisitDto.VISIT_STATUS);
    initializeAccessAndAllowedAccesses();
    if (contact != null) {
        Date startDate = ContactLogic.getStartDate(contact);
        addDateValidation(startDate, startDate, contact.getLastContactDate() != null ? Validations.visitBeforeLastContactDate : Validations.visitBeforeContactReport, contact.getFollowUpUntil());
    }
    if (caze != null) {
        addDateValidation(CaseLogic.getStartDate(caze), caze.getReportDate(), caze.getSymptoms().getOnsetDate() != null ? Validations.visitBeforeSymptomsOnSet : Validations.visitBeforeCaseReport, CaseLogic.getEndDate(caze.getSymptoms().getOnsetDate(), caze.getReportDate(), caze.getFollowUpUntil()));
    }
    symptomsForm.initializeSymptomRequirementsForVisit((NullableOptionGroup) getFieldGroup().getField(VisitDto.VISIT_STATUS));
    FieldHelper.setEnabledWhen(getFieldGroup(), visitStatus, Arrays.asList(VisitStatus.COOPERATIVE), Arrays.asList(VisitDto.SYMPTOMS), true);
}
Also used : NullableOptionGroup(de.symeda.sormas.ui.utils.NullableOptionGroup) SymptomsForm(de.symeda.sormas.ui.symptoms.SymptomsForm) Label(com.vaadin.ui.Label) VerticalLayout(com.vaadin.ui.VerticalLayout) TextField(com.vaadin.v7.ui.TextField) ExternalResource(com.vaadin.server.ExternalResource) Link(com.vaadin.ui.Link) Date(java.util.Date)

Example 49 with VerticalLayout

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

the class EventParticipantsView method createTopBar.

public HorizontalLayout createTopBar() {
    HorizontalLayout topLayout = new HorizontalLayout();
    topLayout.setSpacing(true);
    topLayout.setWidth("100%");
    VerticalLayout exportLayout = new VerticalLayout();
    {
        exportLayout.setSpacing(true);
        exportLayout.setMargin(true);
        exportLayout.addStyleName(CssStyles.LAYOUT_MINIMAL);
        exportLayout.setWidth(250, Unit.PIXELS);
    }
    // import
    if (UserProvider.getCurrent().hasUserRight(UserRight.EVENTPARTICIPANT_IMPORT)) {
        Button importButton = ButtonHelper.createIconButton(Captions.actionImport, VaadinIcons.UPLOAD, e -> {
            Window popupWindow = VaadinUiUtil.showPopupWindow(new EventParticipantImportLayout(getEventRef()));
            popupWindow.setCaption(I18nProperties.getString(Strings.headingImportEventParticipant));
            popupWindow.addCloseListener(c -> this.grid.reload());
        }, ValoTheme.BUTTON_PRIMARY);
        addHeaderComponent(importButton);
    }
    // export
    PopupButton exportPopupButton = ButtonHelper.createIconPopupButton(Captions.export, VaadinIcons.DOWNLOAD, exportLayout);
    addHeaderComponent(exportPopupButton);
    {
        StreamResource streamResource = GridExportStreamResource.createStreamResourceWithSelectedItems(grid, () -> this.grid.getSelectionModel() instanceof MultiSelectionModelImpl ? this.grid.asMultiSelect().getSelectedItems() : null, ExportEntityName.EVENT_PARTICIPANTS);
        addExportButton(streamResource, exportPopupButton, exportLayout, VaadinIcons.TABLE, Captions.exportBasic, Strings.infoBasicExport);
    }
    {
        StreamResource extendedExportStreamResource = EventParticipantDownloadUtil.createExtendedEventParticipantExportResource(grid.getCriteria(), this::getSelectedRows, null);
        addExportButton(extendedExportStreamResource, exportPopupButton, exportLayout, VaadinIcons.FILE_TEXT, Captions.exportDetailed, Descriptions.descDetailedExportButton);
    }
    {
        Button btnCustomExport = ButtonHelper.createIconButton(Captions.exportCustom, VaadinIcons.FILE_TEXT, e -> {
            Window customExportWindow = VaadinUiUtil.createPopupWindow();
            ExportConfigurationsLayout customExportsLayout = new ExportConfigurationsLayout(ExportType.EVENT_PARTICIPANTS, ImportExportUtils.getEventParticipantExportProperties(EventParticipantDownloadUtil::getPropertyCaption, FacadeProvider.getConfigFacade().getCountryLocale()), customExportWindow::close);
            customExportsLayout.setExportCallback((exportConfig) -> Page.getCurrent().open(EventParticipantDownloadUtil.createExtendedEventParticipantExportResource(grid.getCriteria(), this::getSelectedRows, exportConfig), null, true));
            customExportWindow.setWidth(1024, Unit.PIXELS);
            customExportWindow.setCaption(I18nProperties.getCaption(Captions.exportCustom));
            customExportWindow.setContent(customExportsLayout);
            UI.getCurrent().addWindow(customExportWindow);
            exportPopupButton.setPopupVisible(false);
        }, ValoTheme.BUTTON_PRIMARY);
        btnCustomExport.setDescription(I18nProperties.getString(Strings.infoCustomExport));
        btnCustomExport.setWidth(100, Unit.PERCENTAGE);
        exportLayout.addComponent(btnCustomExport);
    }
    filterForm = new EventParticipantsFilterForm();
    filterForm.addValueChangeListener(e -> {
        if (!filterForm.hasFilter()) {
            navigateTo(null);
        }
    });
    filterForm.addResetHandler(e -> {
        ViewModelProviders.of(EventParticipantsView.class).remove(EventParticipantCriteria.class);
        navigateTo(null);
    });
    filterForm.addApplyHandler(e -> navigateTo(criteria));
    topLayout.addComponent(filterForm);
    // Bulk operation dropdown
    if (UserProvider.getCurrent().hasUserRight(UserRight.PERFORM_BULK_OPERATIONS_EVENTPARTICIPANT)) {
        topLayout.setWidth(100, Unit.PERCENTAGE);
        List<MenuBarHelper.MenuBarItem> bulkActions = new ArrayList<>();
        bulkActions.add(new MenuBarHelper.MenuBarItem(I18nProperties.getCaption(Captions.bulkEventParticipantsToContacts), VaadinIcons.HAND, mi -> {
            grid.bulkActionHandler(items -> {
                EventDto eventDto = FacadeProvider.getEventFacade().getEventByUuid(getEventRef().getUuid(), false);
                ControllerProvider.getContactController().openLineListingWindow(eventDto, items);
            }, true);
        }));
        if (UserProvider.getCurrent().hasUserRight(UserRight.EVENTPARTICIPANT_DELETE)) {
            bulkActions.add(new MenuBarHelper.MenuBarItem(I18nProperties.getCaption(Captions.bulkDelete), VaadinIcons.TRASH, mi -> {
                grid.bulkActionHandler(items -> {
                    ControllerProvider.getEventParticipantController().deleteAllSelectedItems(items, () -> navigateTo(criteria));
                }, true);
            }));
        }
        if (isDocGenerationAllowed()) {
            bulkActions.add(new MenuBarHelper.MenuBarItem(I18nProperties.getCaption(Captions.bulkActionCreatDocuments), VaadinIcons.FILE_TEXT, mi -> {
                grid.bulkActionHandler(items -> {
                    List<EventParticipantReferenceDto> references = grid.asMultiSelect().getSelectedItems().stream().map(EventParticipantIndexDto::toReference).collect(Collectors.toList());
                    if (references.size() == 0) {
                        new Notification(I18nProperties.getString(Strings.headingNoEventParticipantsSelected), I18nProperties.getString(Strings.messageNoEventParticipantsSelected), Notification.Type.WARNING_MESSAGE, false).show(Page.getCurrent());
                        return;
                    }
                    EventDto eventDto = FacadeProvider.getEventFacade().getEventByUuid(getEventRef().getUuid(), false);
                    ControllerProvider.getDocGenerationController().showBulkEventParticipantQuarantineOrderDocumentDialog(references, eventDto.getDisease());
                });
            }));
        }
        MenuBar bulkOperationsDropdown = MenuBarHelper.createDropDown(Captions.bulkActions, bulkActions);
        topLayout.addComponent(bulkOperationsDropdown);
        topLayout.setComponentAlignment(bulkOperationsDropdown, Alignment.TOP_RIGHT);
    }
    topLayout.addStyleName(CssStyles.VSPACE_3);
    return topLayout;
}
Also used : Window(com.vaadin.ui.Window) FeatureType(de.symeda.sormas.api.feature.FeatureType) I18nProperties(de.symeda.sormas.api.i18n.I18nProperties) Alignment(com.vaadin.ui.Alignment) UI(com.vaadin.ui.UI) Window(com.vaadin.ui.Window) DetailSubComponentWrapper(de.symeda.sormas.ui.utils.DetailSubComponentWrapper) 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) MenuBarHelper(de.symeda.sormas.ui.utils.MenuBarHelper) Page(com.vaadin.server.Page) VaadinIcons(com.vaadin.icons.VaadinIcons) ComboBoxHelper(de.symeda.sormas.ui.utils.ComboBoxHelper) EventParticipantReferenceDto(de.symeda.sormas.api.event.EventParticipantReferenceDto) UserProvider(de.symeda.sormas.ui.UserProvider) ValoTheme(com.vaadin.ui.themes.ValoTheme) MenuBar(com.vaadin.ui.MenuBar) ComboBox(com.vaadin.v7.ui.ComboBox) ExportType(de.symeda.sormas.api.importexport.ExportType) Set(java.util.Set) EventDto(de.symeda.sormas.api.event.EventDto) Collectors(java.util.stream.Collectors) Objects(java.util.Objects) List(java.util.List) MultiSelectionModelImpl(com.vaadin.ui.components.grid.MultiSelectionModelImpl) CoreEntityType(de.symeda.sormas.api.common.CoreEntityType) Descriptions(de.symeda.sormas.api.i18n.Descriptions) ExportConfigurationsLayout(de.symeda.sormas.ui.customexport.ExportConfigurationsLayout) StreamResource(com.vaadin.server.StreamResource) VaadinUiUtil(de.symeda.sormas.ui.utils.VaadinUiUtil) FacadeProvider(de.symeda.sormas.api.FacadeProvider) VerticalLayout(com.vaadin.ui.VerticalLayout) EventParticipantCriteria(de.symeda.sormas.api.event.EventParticipantCriteria) GridExportStreamResource(de.symeda.sormas.ui.utils.GridExportStreamResource) PopupButton(org.vaadin.hene.popupbutton.PopupButton) EntityRelevanceStatus(de.symeda.sormas.api.EntityRelevanceStatus) ArrayList(java.util.ArrayList) EventParticipantImportLayout(de.symeda.sormas.ui.events.eventparticipantimporter.EventParticipantImportLayout) Notification(com.vaadin.ui.Notification) Label(com.vaadin.ui.Label) EventParticipantIndexDto(de.symeda.sormas.api.event.EventParticipantIndexDto) ButtonHelper(de.symeda.sormas.ui.utils.ButtonHelper) ContentMode(com.vaadin.shared.ui.ContentMode) 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) ImportExportUtils(de.symeda.sormas.api.importexport.ImportExportUtils) HorizontalLayout(com.vaadin.ui.HorizontalLayout) EventParticipantDownloadUtil(de.symeda.sormas.ui.utils.EventParticipantDownloadUtil) FeatureTypeProperty(de.symeda.sormas.api.feature.FeatureTypeProperty) Strings(de.symeda.sormas.api.i18n.Strings) DocGenerationHelper.isDocGenerationAllowed(de.symeda.sormas.ui.docgeneration.DocGenerationHelper.isDocGenerationAllowed) Collections(java.util.Collections) ExportConfigurationsLayout(de.symeda.sormas.ui.customexport.ExportConfigurationsLayout) EventParticipantImportLayout(de.symeda.sormas.ui.events.eventparticipantimporter.EventParticipantImportLayout) EventParticipantDownloadUtil(de.symeda.sormas.ui.utils.EventParticipantDownloadUtil) ArrayList(java.util.ArrayList) EventDto(de.symeda.sormas.api.event.EventDto) MenuBar(com.vaadin.ui.MenuBar) Notification(com.vaadin.ui.Notification) HorizontalLayout(com.vaadin.ui.HorizontalLayout) MenuBarHelper(de.symeda.sormas.ui.utils.MenuBarHelper) PopupButton(org.vaadin.hene.popupbutton.PopupButton) StreamResource(com.vaadin.server.StreamResource) GridExportStreamResource(de.symeda.sormas.ui.utils.GridExportStreamResource) PopupButton(org.vaadin.hene.popupbutton.PopupButton) Button(com.vaadin.ui.Button) MultiSelectionModelImpl(com.vaadin.ui.components.grid.MultiSelectionModelImpl) VerticalLayout(com.vaadin.ui.VerticalLayout) List(java.util.List) ArrayList(java.util.ArrayList) EventParticipantIndexDto(de.symeda.sormas.api.event.EventParticipantIndexDto)

Example 50 with VerticalLayout

use of com.vaadin.v7.ui.VerticalLayout in project opencms-core by alkacon.

the class CmsProjectsTable method showProjectResources.

/**
 * Displays project resources in a popup dialog.
 *
 * @param item the item from which to take the project resources
 */
public static void showProjectResources(Item item) {
    VerticalLayout layout = new VerticalLayout();
    ProjectResources pr = (ProjectResources) (item.getItemProperty(PROP_RESOURCES).getValue());
    for (String path : pr) {
        layout.addComponent(new Label(path));
    }
    layout.setSpacing(false);
    CmsBasicDialog dialog = new CmsBasicDialog();
    dialog.setContent(layout);
    Window window = CmsBasicDialog.prepareWindow(DialogWidth.wide);
    String ou = "" + item.getItemProperty(PROP_ORG_UNIT).getValue();
    String project = "" + item.getItemProperty(PROP_NAME).getValue();
    String caption = CmsVaadinUtils.getMessageText(org.opencms.ui.apps.Messages.GUI_PROJECTS_RESOURCES_POPUP_CAPTION_2, project, ou);
    window.setCaption(caption);
    window.setContent(dialog);
    CmsAppWorkplaceUi.get().addWindow(window);
}
Also used : CmsBasicDialog(org.opencms.ui.components.CmsBasicDialog) Window(com.vaadin.ui.Window) Label(com.vaadin.v7.ui.Label) VerticalLayout(com.vaadin.ui.VerticalLayout)

Aggregations

VerticalLayout (com.vaadin.v7.ui.VerticalLayout)34 VerticalLayout (com.vaadin.ui.VerticalLayout)25 Button (com.vaadin.ui.Button)22 Label (com.vaadin.ui.Label)18 Label (com.vaadin.v7.ui.Label)17 HorizontalLayout (com.vaadin.ui.HorizontalLayout)16 Window (com.vaadin.ui.Window)12 Component (com.vaadin.ui.Component)11 ValoTheme (com.vaadin.ui.themes.ValoTheme)11 I18nProperties (de.symeda.sormas.api.i18n.I18nProperties)11 VaadinIcons (com.vaadin.icons.VaadinIcons)10 Panel (com.vaadin.ui.Panel)10 TextField (com.vaadin.v7.ui.TextField)10 Strings (de.symeda.sormas.api.i18n.Strings)10 ButtonHelper (de.symeda.sormas.ui.utils.ButtonHelper)10 CssStyles (de.symeda.sormas.ui.utils.CssStyles)10 Captions (de.symeda.sormas.api.i18n.Captions)9 Alignment (com.vaadin.ui.Alignment)8 CheckBox (com.vaadin.v7.ui.CheckBox)8 OptionGroup (com.vaadin.v7.ui.OptionGroup)8