Example usage for com.vaadin.ui VerticalLayout setStyleName

List of usage examples for com.vaadin.ui VerticalLayout setStyleName

Introduction

In this page you can find the example usage for com.vaadin.ui VerticalLayout setStyleName.

Prototype

@Override
    public void setStyleName(String style) 

Source Link

Usage

From source file:org.lunifera.examples.runtime.web.vaadin.cm.Vaadin7CMDemoUI.java

License:Open Source License

@Override
public void init(VaadinRequest request) {

    label = new Label(MSG);

    VerticalLayout layout = new VerticalLayout(label);
    layout.setStyleName(Reindeer.LAYOUT_BLUE);
    layout.setSizeFull();/*w  w w  .jav a  2 s  .  c om*/
    layout.setMargin(true);
    setContent(layout);

    new InitializerThread().start();
}

From source file:org.processbase.ui.bam.admin.DimentionWindow.java

License:Open Source License

public void initUI() {
    try {/* w  w w .j  ava2 s . c  o m*/
        if (metaDim == null) {
            setCaption(ProcessbaseApplication.getCurrent().getPbMessages().getString("newDimension"));
        } else {
            setCaption(ProcessbaseApplication.getCurrent().getPbMessages().getString("dimension")
                    + metaDim.getCode());
        }
        setModal(true);
        VerticalLayout layout = (VerticalLayout) this.getContent();
        layout.setMargin(true);
        layout.setSpacing(true);
        layout.setStyleName(Reindeer.LAYOUT_WHITE);

        closeBtn = new Button(ProcessbaseApplication.getCurrent().getPbMessages().getString("btnClose"), this);
        saveBtn = new Button(ProcessbaseApplication.getCurrent().getPbMessages().getString("btnSave"), this);
        code = new TextField(ProcessbaseApplication.getCurrent().getPbMessages().getString("code"));
        name = new TextField(ProcessbaseApplication.getCurrent().getPbMessages().getString("name"));
        valueType = new NativeSelect(
                ProcessbaseApplication.getCurrent().getPbMessages().getString("valueType"));
        length = new TextField(ProcessbaseApplication.getCurrent().getPbMessages().getString("length"));

        code.setWidth("270px");
        code.setMaxLength(20);
        code.setRequired(true);
        code.addValidator(new RegexpValidator("^[A-Z]\\w{1,15}$",
                ProcessbaseApplication.getCurrent().getPbMessages().getString("codeValidatorError")));
        addComponent(code);
        name.setWidth("270px");
        name.setMaxLength(500);
        name.setRequired(true);
        addComponent(name);
        valueType.addItem("int");
        valueType.addItem("java.lang.String");
        valueType.addItem("long");
        valueType.setWidth("265px");
        valueType.setNullSelectionAllowed(false);
        valueType.setRequired(true);
        valueType.addListener(this);
        valueType.setImmediate(true);
        addComponent(valueType);
        length.setWidth("270px");
        length.setMaxLength(4);
        length.setEnabled(false);
        length.setRequired(false);
        addComponent(length);

        if (metaDim != null) {
            code.setValue(metaDim.getCode());
            name.setValue(metaDim.getName());
            valueType.setValue(metaDim.getValueType());
            length.setValue(metaDim.getValueLength());
        } else {
            ArrayList<MetaDim> metaDims = ProcessbaseApplication.getCurrent().getBpmModule()
                    .execute(new GetAllMetaDim());
            code.setValue("D" + String.format("%05d", new Integer(metaDims.size() + 1)));
        }

        buttons.addButton(saveBtn);
        buttons.setComponentAlignment(saveBtn, Alignment.MIDDLE_RIGHT);
        buttons.setExpandRatio(saveBtn, 1);
        buttons.addButton(closeBtn);
        buttons.setComponentAlignment(closeBtn, Alignment.MIDDLE_RIGHT);
        buttons.setMargin(false);
        buttons.setHeight("30px");
        buttons.setWidth("100%");
        addComponent(buttons);
        setWidth("310px");
        setResizable(false);
    } catch (Exception ex) {
        ex.printStackTrace();
        showError(ex.getMessage());
    }
}

From source file:org.processbase.ui.bam.admin.FactWindow.java

License:Open Source License

public void initUI() {
    try {//from   ww  w  . j  av  a2s .c o  m
        if (metaFact == null) {
            setCaption(ProcessbaseApplication.getCurrent().getPbMessages().getString("newFact"));
        } else {
            setCaption(
                    ProcessbaseApplication.getCurrent().getPbMessages().getString("fact") + metaFact.getCode());
        }
        setModal(true);
        VerticalLayout layout = (VerticalLayout) this.getContent();
        layout.setMargin(true);
        layout.setSpacing(true);
        layout.setStyleName(Reindeer.LAYOUT_WHITE);

        closeBtn = new Button(ProcessbaseApplication.getCurrent().getPbMessages().getString("btnClose"), this);
        saveBtn = new Button(ProcessbaseApplication.getCurrent().getPbMessages().getString("btnSave"), this);
        code = new TextField(ProcessbaseApplication.getCurrent().getPbMessages().getString("code"));
        name = new TextField(ProcessbaseApplication.getCurrent().getPbMessages().getString("name"));

        code.setWidth("265px");
        code.setMaxLength(20);
        code.setRequired(true);
        code.addValidator(new RegexpValidator("^[A-Z]\\w{1,15}$",
                ProcessbaseApplication.getCurrent().getPbMessages().getString("codeValidatorError")));
        addComponent(code);
        name.setWidth("265px");
        name.setMaxLength(500);
        name.setRequired(true);
        addComponent(name);

        if (metaFact != null) {
            code.setValue(metaFact.getCode());
            name.setValue(metaFact.getName());
        } else {
            ArrayList<MetaFact> metaFacts = ProcessbaseApplication.getCurrent().getBpmModule()
                    .execute(new GetAllMetaFact());
            code.setValue("F" + String.format("%05d", new Integer(metaFacts.size() + 1)));
        }

        buttons.addButton(saveBtn);
        buttons.setComponentAlignment(saveBtn, Alignment.MIDDLE_RIGHT);
        buttons.setExpandRatio(saveBtn, 1);
        buttons.addButton(closeBtn);
        buttons.setComponentAlignment(closeBtn, Alignment.MIDDLE_RIGHT);
        buttons.setMargin(false);
        buttons.setHeight("30px");
        buttons.setWidth("100%");
        addComponent(buttons);
        setWidth("310px");
        setResizable(false);
    } catch (Exception ex) {
        ex.printStackTrace();
        showError(ex.getMessage());
    }
}

From source file:org.processbase.ui.bpm.admin.CategoryWindow.java

License:Open Source License

public void initUI() {
    try {//from   w  w w.  ja  v a2 s.c  om
        setModal(true);
        VerticalLayout layout = (VerticalLayout) this.getContent();
        layout.setMargin(true);
        layout.setSpacing(true);
        layout.setStyleName(Reindeer.LAYOUT_WHITE);

        processesComboBox = new ComboBox(
                ProcessbaseApplication.getCurrent().getPbMessages().getString("processToCategory"));
        processesComboBox.setFilteringMode(Filtering.FILTERINGMODE_CONTAINS);
        //            processesComboBox.setItemCaptionPropertyId("name");
        processesComboBox.setItemCaptionMode(AbstractSelect.ITEM_CAPTION_MODE_EXPLICIT);
        processesComboBox.setWidth("100%");

        bar.setWidth("100%");
        bar.addComponent(processesComboBox);
        bar.setExpandRatio(processesComboBox, 1);

        addBtn = new Button(ProcessbaseApplication.getCurrent().getPbMessages().getString("btnAdd"), this);
        bar.addComponent(addBtn);
        bar.setComponentAlignment(addBtn, Alignment.BOTTOM_RIGHT);

        layout.addComponent(bar);
        layout.addComponent(table);

        deleteBtn = new Button(ProcessbaseApplication.getCurrent().getPbMessages().getString("btnDelete"),
                this);
        deleteBtn.setDescription(
                ProcessbaseApplication.getCurrent().getPbMessages().getString("deleteCategory"));
        cancelBtn = new Button(ProcessbaseApplication.getCurrent().getPbMessages().getString("btnCancel"),
                this);
        saveBtn = new Button(ProcessbaseApplication.getCurrent().getPbMessages().getString("btnSave"), this);
        buttons.addButton(deleteBtn);
        buttons.setComponentAlignment(deleteBtn, Alignment.MIDDLE_RIGHT);
        buttons.addButton(saveBtn);
        buttons.setComponentAlignment(saveBtn, Alignment.MIDDLE_RIGHT);
        buttons.setExpandRatio(saveBtn, 1);
        buttons.addButton(cancelBtn);
        buttons.setComponentAlignment(cancelBtn, Alignment.MIDDLE_RIGHT);
        buttons.setMargin(false);
        buttons.setHeight("30px");
        buttons.setWidth("100%");
        addComponent(buttons);
        setWidth("70%");
        //            setHeight("70%");
        setResizable(false);

        table.addContainerProperty("name", String.class, null,
                ProcessbaseApplication.getCurrent().getPbMessages().getString("tableCaptionProcessName"), null,
                null);
        table.setColumnExpandRatio("name", 1);
        table.addContainerProperty("version", String.class, null,
                ProcessbaseApplication.getCurrent().getPbMessages().getString("tableCaptionVersion"), null,
                null);
        table.setColumnWidth("version", 50);
        table.addContainerProperty("deployedBy", String.class, null,
                ProcessbaseApplication.getCurrent().getPbMessages().getString("tableCaptionDeployedBy"), null,
                null);
        table.addContainerProperty("actions", TableLinkButton.class, null,
                ProcessbaseApplication.getCurrent().getPbMessages().getString("tableCaptionActions"), null,
                null);
        table.setColumnWidth("actions", 50);
        table.setSelectable(false);
        table.setImmediate(true);
        table.setWidth("100%");
        table.setPageLength(10);
        refreshTable();
    } catch (Exception ex) {
        ex.printStackTrace();
        showError(ex.getMessage());
    }
}

From source file:org.processbase.ui.bpm.admin.NewCategoryWindow.java

License:Open Source License

public void initUI() {
    try {//from   www  .  j a va2 s  .  co m
        setCaption(ProcessbaseApplication.getCurrent().getPbMessages().getString("newCategory"));
        setModal(true);
        VerticalLayout layout = (VerticalLayout) this.getContent();
        layout.setMargin(true);
        layout.setSpacing(true);
        layout.setStyleName(Reindeer.LAYOUT_WHITE);

        categoryName = new TextField(
                ProcessbaseApplication.getCurrent().getPbMessages().getString("categoryName"));
        categoryName.setWidth("270px");
        addComponent(categoryName);

        cancelBtn = new Button(ProcessbaseApplication.getCurrent().getPbMessages().getString("btnCancel"),
                this);
        applyBtn = new Button(ProcessbaseApplication.getCurrent().getPbMessages().getString("btnSave"), this);

        buttons.addButton(applyBtn);
        buttons.setComponentAlignment(applyBtn, Alignment.MIDDLE_RIGHT);
        buttons.setExpandRatio(applyBtn, 1);
        buttons.addButton(cancelBtn);
        buttons.setComponentAlignment(cancelBtn, Alignment.MIDDLE_RIGHT);
        buttons.setMargin(false);
        buttons.setHeight("30px");
        buttons.setWidth("100%");
        addComponent(buttons);
        setWidth("300px");
        setResizable(false);
    } catch (Exception ex) {
        ex.printStackTrace();
        showError(ex.getMessage());
    }
}

From source file:org.processbase.ui.bpm.admin.NewProcessDefinitionWindow.java

License:Open Source License

public void initUI() {
    try {/* w ww.ja  va 2s  .  c o m*/
        setCaption(ProcessbaseApplication.getCurrent().getPbMessages().getString("newProcessDefinition"));
        setModal(true);
        VerticalLayout layout = (VerticalLayout) this.getContent();
        layout.setMargin(true);
        layout.setSpacing(true);
        layout.setStyleName(Reindeer.LAYOUT_WHITE);

        // prepare upload button
        upload.setButtonCaption(ProcessbaseApplication.getCurrent().getPbMessages().getString("btnUpload"));
        upload.addListener((Upload.SucceededListener) this);
        upload.addListener((Upload.FailedListener) this);
        addComponent(upload);

        setWidth("350px");
        setResizable(false);
    } catch (Exception ex) {
        ex.printStackTrace();
        showError(ex.getMessage());
    }
}

From source file:org.processbase.ui.bpm.admin.ProcessDefinitionWindow.java

License:Open Source License

public void initUI() {
    try {//from  ww w .j  a  va  2  s  . c  om
        String caption = processDefinition.getLabel() != null ? processDefinition.getLabel()
                : processDefinition.getName();
        setCaption(caption + " (v." + processDefinition.getVersion() + ")");
        VerticalLayout layout = (VerticalLayout) this.getContent();
        layout.setMargin(true);
        layout.setSpacing(true);
        layout.setStyleName(Reindeer.LAYOUT_WHITE);

        v1.setMargin(true, false, false, false);
        v1.setSizeFull();

        if (processDefinition.getLabel() != null) {
            Label pdLabel = new Label("<b>" + processDefinition.getLabel() + "</b>");
            pdLabel.setContentMode(Label.CONTENT_XHTML);
            v1.addComponent(pdLabel);
        }

        if (processDefinition.getDescription() != null) {
            Label pdDescription = new Label(processDefinition.getDescription());
            pdDescription.setContentMode(Label.CONTENT_XHTML);
            v1.addComponent(pdDescription);
            v1.setExpandRatio(pdDescription, 1);
        }

        tabSheet.addTab(v1, ProcessbaseApplication.getCurrent().getPbMessages().getString("tabDescription"),
                null);

        activitiesTable.setSizeFull();

        v2.setMargin(false, false, false, false);
        v2.addComponent(activitiesTable);
        v2.setSizeFull();
        tabSheet.addTab(v2, ProcessbaseApplication.getCurrent().getPbMessages().getString("tabCustomUI"), null);

        // prepare membership
        prepareTableMembership();
        addBtn = new Button(ProcessbaseApplication.getCurrent().getPbMessages().getString("btnAdd"), this);
        addBtn.setStyleName(Runo.BUTTON_SMALL);
        v3.setMargin(false, false, false, false);
        v3.setSpacing(true);
        v3.addComponent(addBtn);
        v3.setComponentAlignment(addBtn, Alignment.MIDDLE_RIGHT);
        v3.addComponent(tableMembership);
        v3.setSizeFull();
        tabSheet.addTab(v3, ProcessbaseApplication.getCurrent().getPbMessages().getString("processAccess"),
                null);
        refreshTableMembership();

        tabSheet.setStyleName(Reindeer.TABSHEET_MINIMAL);
        tabSheet.setSizeFull();
        tabSheet.addListener((TabSheet.SelectedTabChangeListener) this);
        layout.addComponent(tabSheet);
        layout.setExpandRatio(tabSheet, 1);

        closeBtn = new Button(ProcessbaseApplication.getCurrent().getPbMessages().getString("btnClose"), this);
        applyBtn = new Button(ProcessbaseApplication.getCurrent().getPbMessages().getString("btnSaveCustomUI"),
                this);
        saveAccessBtn = new Button(
                ProcessbaseApplication.getCurrent().getPbMessages().getString("btnSaveProcessAccess"), this);
        deleteAllBtn = new Button(ProcessbaseApplication.getCurrent().getPbMessages().getString("btnDeleteAll"),
                this);
        deleteInstancesBtn = new Button(
                ProcessbaseApplication.getCurrent().getPbMessages().getString("btnDeleteInstances"), this);
        downloadBtn = new Button(ProcessbaseApplication.getCurrent().getPbMessages().getString("btnDownload"),
                this);
        enableBtn = new CheckBox(ProcessbaseApplication.getCurrent().getPbMessages().getString("btnEnable"),
                this);
        archiveBtn = new Button(ProcessbaseApplication.getCurrent().getPbMessages().getString("btnArchive"),
                this);

        deleteAllBtn.setDescription(
                ProcessbaseApplication.getCurrent().getPbMessages().getString("deleteProcessDefinition"));
        buttons.addButton(deleteAllBtn);
        buttons.setComponentAlignment(deleteAllBtn, Alignment.MIDDLE_RIGHT);
        deleteInstancesBtn.setDescription(
                ProcessbaseApplication.getCurrent().getPbMessages().getString("deleteProcessInstances"));
        buttons.addButton(deleteInstancesBtn);
        buttons.setComponentAlignment(deleteInstancesBtn, Alignment.MIDDLE_RIGHT);

        Label expand = new Label("");
        buttons.addComponent(expand);
        buttons.setExpandRatio(expand, 1);

        enableBtn.setValue(processDefinition.getState().equals(ProcessState.ENABLED));
        buttons.addButton(enableBtn);
        buttons.setComponentAlignment(enableBtn, Alignment.MIDDLE_RIGHT);

        buttons.addButton(archiveBtn);
        buttons.setComponentAlignment(archiveBtn, Alignment.MIDDLE_RIGHT);

        applyBtn.setVisible(false);
        buttons.addButton(applyBtn);
        buttons.setComponentAlignment(applyBtn, Alignment.MIDDLE_RIGHT);
        buttons.addButton(saveAccessBtn);
        saveAccessBtn.setVisible(false);
        buttons.setComponentAlignment(saveAccessBtn, Alignment.MIDDLE_RIGHT);
        buttons.addButton(closeBtn);
        buttons.setComponentAlignment(closeBtn, Alignment.MIDDLE_RIGHT);
        buttons.setMargin(false);
        buttons.setHeight("30px");
        buttons.setWidth("100%");
        layout.addComponent(buttons);
        layout.setWidth("800px");
        layout.setHeight("400px");
        setResizable(false);
        setModal(true);

        //        activitiesTable.addContainerProperty("activityUUID", String.class, null, "UUID", null, null);
        //        activitiesTable.setColumnWidth("activityUUID", 0);
        activitiesTable.addContainerProperty("activityLabel", String.class, null,
                ProcessbaseApplication.getCurrent().getPbMessages().getString("tableCaptionActivityName"), null,
                null);
        activitiesTable.addContainerProperty("url", String.class, null,
                ProcessbaseApplication.getCurrent().getPbMessages().getString("tabCaptionTaskURL"), null, null);
        activitiesTable.setColumnWidth("url", 300);
        activitiesTable.setTableFieldFactory(new PbTableFieldFactory());
        activitiesTable.setEditable(true);
        activitiesTable.setImmediate(true);

        refreshTable();
    } catch (Exception ex) {
        ex.printStackTrace();
        showError(ex.getMessage());
    }
}

From source file:org.processbase.ui.bpm.admin.UserWindow.java

License:Open Source License

public void initUI() {
    try {//from   www .  j a  va2s.com
        if (user == null) {
            setCaption(ProcessbaseApplication.getString("newUser"));
        } else {
            setCaption(ProcessbaseApplication.getString("user"));
        }
        setModal(true);
        VerticalLayout layout = (VerticalLayout) this.getContent();
        layout.setMargin(true);
        layout.setSpacing(true);
        layout.setStyleName(Reindeer.LAYOUT_WHITE);
        layout.setSizeFull();

        addBtn = new Button(ProcessbaseApplication.getString("btnAdd"), this);
        closeBtn = new Button(ProcessbaseApplication.getString("btnClose"), this);
        saveBtn = new Button(ProcessbaseApplication.getString("btnSave"), this);
        userFirstName = new TextField(ProcessbaseApplication.getString("userFirstName"));
        userLastName = new TextField(ProcessbaseApplication.getString("userLastName"));
        userName = new TextField(ProcessbaseApplication.getString("userName"));
        userEmail = new TextField(ProcessbaseApplication.getString("userEmail"));
        userJobTitle = new TextField(ProcessbaseApplication.getString("userJobTitle"));
        password = new PasswordField(ProcessbaseApplication.getString("password"));

        // prepare user information
        userInfofmation.setMargin(true);
        userInfofmation.setSpacing(true);
        userName.setWidth("270px");
        userInfofmation.addComponent(userName);
        password.setWidth("270px");
        userInfofmation.addComponent(password);
        userFirstName.setWidth("270px");
        userInfofmation.addComponent(userFirstName);
        userLastName.setWidth("270px");
        userInfofmation.addComponent(userLastName);
        userEmail.setWidth("270px");
        userInfofmation.addComponent(userEmail);
        userJobTitle.setWidth("270px");
        userInfofmation.addComponent(userJobTitle);

        // prepare user membership
        userMembership.setMargin(true);
        userMembership.setSpacing(true);
        userMembership.setSizeFull();
        prepareTableMembership();
        userMembership.addComponent(tableMembership);

        // prepare user metadata
        userMetadata.setMargin(true);
        userMetadata.setSpacing(true);
        userMetadata.setSizeFull();
        prepareTableMetadata();
        userMetadata.addComponent(tableMetadata);

        // prepare tabSheet
        tabSheet.addTab(userInfofmation, ProcessbaseApplication.getString("userInfofmation"), null);
        tabSheet.addTab(userMembership, ProcessbaseApplication.getString("userMembership"), null);
        tabSheet.addTab(userMetadata, ProcessbaseApplication.getString("userMetadata"), null);
        tabSheet.addListener((TabSheet.SelectedTabChangeListener) this);
        tabSheet.setImmediate(true);
        tabSheet.setSizeFull();
        layout.addComponent(tabSheet);
        layout.setExpandRatio(tabSheet, 1);

        addBtn.setVisible(false);
        buttons.addButton(addBtn);
        buttons.setComponentAlignment(addBtn, Alignment.MIDDLE_RIGHT);
        buttons.addButton(saveBtn);
        buttons.setComponentAlignment(saveBtn, Alignment.MIDDLE_RIGHT);
        buttons.setExpandRatio(saveBtn, 1);
        buttons.addButton(closeBtn);
        buttons.setComponentAlignment(closeBtn, Alignment.MIDDLE_RIGHT);
        buttons.setMargin(false);
        buttons.setHeight("30px");
        buttons.setWidth("100%");
        addComponent(buttons);

        if (user != null) {
            userFirstName.setValue(user.getFirstName());
            userLastName.setValue(user.getLastName());
            userName.setValue(user.getUsername());
            userEmail.setValue(
                    user.getProfessionalContactInfo() != null ? user.getProfessionalContactInfo().getEmail()
                            : "");
            userJobTitle.setValue(user.getJobTitle());
            password.setValue(user.getPassword());
            refreshTableMembership();
            refreshTableMetadata();
            userName.setReadOnly(true);
        }
        setWidth("800px");
        setHeight("500px");
        setResizable(false);
        setModal(true);
    } catch (Exception ex) {
        ex.printStackTrace();
        showError(ex.getMessage());
        throw new RuntimeException(ex);
    }
}

From source file:org.processbase.ui.bpm.development.NewJarWindow.java

License:Open Source License

public void initUI() {
    try {/* w w  w. j  a  va  2 s . c  o  m*/
        setCaption("Add new Tabsheet module jar");
        setModal(true);
        VerticalLayout layout = (VerticalLayout) this.getContent();
        layout.setMargin(true);
        layout.setSpacing(true);
        layout.setStyleName(Reindeer.LAYOUT_WHITE);

        // prepare upload button
        upload.setButtonCaption(ProcessbaseApplication.getCurrent().getPbMessages().getString("btnUpload"));
        upload.addListener((Upload.SucceededListener) this);
        upload.addListener((Upload.FailedListener) this);
        addComponent(upload);

        setWidth("350px");
        setResizable(false);
    } catch (Exception ex) {
        ex.printStackTrace();
        showError(ex.getMessage());
    }
}

From source file:org.processbase.ui.bpm.identity.GroupWindow.java

License:Open Source License

public void initUI() {
    try {//from   w  ww. ja  v a2  s.c  o  m
        if (group == null) {
            setCaption(ProcessbaseApplication.getCurrent().getPbMessages().getString("newGroup"));
        } else {
            setCaption(ProcessbaseApplication.getCurrent().getPbMessages().getString("group"));
        }
        setModal(true);
        VerticalLayout layout = (VerticalLayout) this.getContent();
        layout.setMargin(true);
        layout.setSpacing(true);
        layout.setStyleName(Reindeer.LAYOUT_WHITE);

        cancelBtn = new Button(ProcessbaseApplication.getCurrent().getPbMessages().getString("btnCancel"),
                this);
        applyBtn = new Button(ProcessbaseApplication.getCurrent().getPbMessages().getString("btnSave"), this);
        groupName = new TextField(ProcessbaseApplication.getCurrent().getPbMessages().getString("groupName"));
        groupLabel = new TextField(ProcessbaseApplication.getCurrent().getPbMessages().getString("groupLabel"));
        groupDescription = new TextArea(
                ProcessbaseApplication.getCurrent().getPbMessages().getString("groupDescription"));
        parentGroup = new ComboBox(
                ProcessbaseApplication.getCurrent().getPbMessages().getString("groupParent"));

        parentGroup.setWidth("270px");
        parentGroup.setContainerDataSource(getGroups());
        parentGroup.setItemCaptionPropertyId("path");
        parentGroup.setFilteringMode(ComboBox.FILTERINGMODE_CONTAINS);
        addComponent(parentGroup);
        groupName.setWidth("270px");
        addComponent(groupName);
        groupLabel.setWidth("270px");
        addComponent(groupLabel);
        groupDescription.setWidth("270px");
        addComponent(groupDescription);

        if (group != null) {
            groupName.setValue(group.getName());
            groupLabel.setValue(group.getLabel());
            groupDescription.setValue(group.getDescription());
            if (group.getParentGroup() != null) {
                parentGroup.setValue(group.getParentGroup().getUUID());
            }
        }

        buttons.addButton(applyBtn);
        buttons.setComponentAlignment(applyBtn, Alignment.MIDDLE_RIGHT);
        buttons.setExpandRatio(applyBtn, 1);
        buttons.addButton(cancelBtn);
        buttons.setComponentAlignment(cancelBtn, Alignment.MIDDLE_RIGHT);
        buttons.setMargin(false);
        buttons.setHeight("30px");
        buttons.setWidth("100%");
        addComponent(buttons);
        setWidth("310px");
        setResizable(false);
    } catch (Exception ex) {
        ex.printStackTrace();
        showError(ex.getMessage());
    }
}