Example usage for com.vaadin.ui VerticalLayout setExpandRatio

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

Introduction

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

Prototype

public void setExpandRatio(Component component, float ratio) 

Source Link

Document

This method is used to control how excess space in layout is distributed among components.

Usage

From source file:com.hack23.cia.web.impl.ui.application.views.user.committee.pagemode.CommitteeOverviewPageModContentFactoryImpl.java

License:Apache License

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override/*from   www.jav  a  2  s .  c  om*/
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();

    final String pageId = getPageId(parameters);

    final DataContainer<ViewRiksdagenCommittee, String> dataContainer = getApplicationManager()
            .getDataContainer(ViewRiksdagenCommittee.class);

    final ViewRiksdagenCommittee viewRiksdagenCommittee = dataContainer.load(pageId);

    if (viewRiksdagenCommittee != null) {

        getCommitteeMenuItemFactory().createCommitteeeMenuBar(menuBar, pageId);

        LabelFactory.createHeader2Label(panelContent, OVERVIEW);

        final VerticalLayout overviewLayout = new VerticalLayout();
        overviewLayout.setSizeFull();

        panelContent.addComponent(overviewLayout);
        panelContent.setExpandRatio(overviewLayout, ContentRatio.LARGE_FORM);

        getCommitteeMenuItemFactory().createOverviewPage(overviewLayout, pageId);

        final Link addCommitteePageLink = getPageLinkFactory().addCommitteePageLink(viewRiksdagenCommittee);
        panelContent.addComponent(addCommitteePageLink);

        getFormFactory().addFormPanelTextFields(panelContent, new BeanItem<>(viewRiksdagenCommittee),
                ViewRiksdagenCommittee.class,
                Arrays.asList(new String[] { "embeddedId.detail", "active", "firstAssignmentDate",
                        "lastAssignmentDate", "totalAssignments", "totalDaysServed", "currentMemberSize" }));

        panelContent.setExpandRatio(addCommitteePageLink, ContentRatio.SMALL);

        panel.setCaption(COMMITTEE + viewRiksdagenCommittee.getEmbeddedId().getDetail());
        getPageActionEventHelper().createPageEvent(ViewAction.VISIT_COMMITTEE_VIEW, ApplicationEventGroup.USER,
                NAME, parameters, pageId);
    }
    return panelContent;

}

From source file:com.hack23.cia.web.impl.ui.application.views.user.document.pagemode.DocumentAttachementsPageModContentFactoryImpl.java

License:Apache License

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override//from   ww  w. j av  a2  s.  co  m
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();

    final String pageId = getPageId(parameters);

    final DataContainer<DocumentElement, String> documentElementDataContainer = getApplicationManager()
            .getDataContainer(DocumentElement.class);

    final DataContainer<DocumentStatusContainer, String> documentStatusContainerDataContainer = getApplicationManager()
            .getDataContainer(DocumentStatusContainer.class);

    getApplicationManager().getDataContainer(CommitteeProposalComponentData.class);

    final DocumentElement documentElement = documentElementDataContainer.load(pageId);

    if (documentElement != null) {

        getDocumentMenuItemFactory().createDocumentMenuBar(menuBar, pageId);

        final DocumentStatusContainer documentStatusContainer = documentStatusContainerDataContainer
                .findByQueryProperty(DocumentStatusContainer.class, DocumentStatusContainer_.document,
                        DocumentData.class, DocumentData_.id, pageId);

        LabelFactory.createHeader2Label(panelContent, DOCUMENT_ATTACHMENTS);

        if (documentStatusContainer != null && documentStatusContainer.getDocumentAttachmentContainer() != null
                && documentStatusContainer.getDocumentAttachmentContainer()
                        .getDocumentAttachmentList() != null) {
            final BeanItemContainer<DocumentAttachment> documentAttachmentDataSource = new BeanItemContainer<>(
                    DocumentAttachment.class,
                    documentStatusContainer.getDocumentAttachmentContainer().getDocumentAttachmentList());

            getGridFactory().createBasicBeanItemGrid(panelContent, documentAttachmentDataSource,
                    "Document attachements", new String[] { "fileName", "fileSize", "fileType", "fileUrl" },
                    new String[] { "hjid" }, null, null, null);

            final List<DocumentAttachment> documentAttachmentList = documentStatusContainer
                    .getDocumentAttachmentContainer().getDocumentAttachmentList();

            final VerticalLayout verticalLayout = new VerticalLayout();
            panelContent.addComponent(verticalLayout);
            panelContent.setExpandRatio(verticalLayout, ContentRatio.SMALL);

            for (final DocumentAttachment documentAttachment : documentAttachmentList) {
                final ExternalAttachmentDownloadLink link = new ExternalAttachmentDownloadLink(
                        documentAttachment.getFileName(), documentAttachment.getFileType(),
                        documentAttachment.getFileUrl());
                verticalLayout.addComponent(link);
            }
        }

        panel.setContent(panelContent);
        getPageActionEventHelper().createPageEvent(ViewAction.VISIT_DOCUMENT_VIEW, ApplicationEventGroup.USER,
                NAME, parameters, pageId);
    }

    return panelContent;

}

From source file:com.hack23.cia.web.impl.ui.application.views.user.document.pagemode.DocumentDataPageModContentFactoryImpl.java

License:Apache License

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override//from w w  w .  j  a va  2 s  . c o m
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();

    final String pageId = getPageId(parameters);

    final DataContainer<DocumentElement, String> documentElementDataContainer = getApplicationManager()
            .getDataContainer(DocumentElement.class);

    final DataContainer<DocumentContentData, String> documentContentDataDataContainer = getApplicationManager()
            .getDataContainer(DocumentContentData.class);

    getApplicationManager().getDataContainer(CommitteeProposalComponentData.class);

    final DocumentElement documentElement = documentElementDataContainer.load(pageId);

    if (documentElement != null) {

        getDocumentMenuItemFactory().createDocumentMenuBar(menuBar, pageId);

        LabelFactory.createHeader2Label(panelContent, DOCUMENT_DATA);

        final List<DocumentContentData> documentContentlist = documentContentDataDataContainer
                .getAllBy(DocumentContentData_.id, pageId);

        if (!documentContentlist.isEmpty()) {

            final Panel formPanel = new Panel();
            formPanel.setSizeFull();

            panelContent.addComponent(formPanel);

            final FormLayout formContent = new FormLayout();
            formPanel.setContent(formContent);

            final Label htmlContent = new Label(documentContentlist.get(0).getContent(), ContentMode.HTML);

            formContent.addComponent(htmlContent);

            panelContent.setExpandRatio(formPanel, ContentRatio.GRID);

        }

        panel.setContent(panelContent);
        getPageActionEventHelper().createPageEvent(ViewAction.VISIT_DOCUMENT_VIEW, ApplicationEventGroup.USER,
                NAME, parameters, pageId);
    }

    return panelContent;

}

From source file:com.hack23.cia.web.impl.ui.application.views.user.document.pagemode.DocumentOverviewPageModContentFactoryImpl.java

License:Apache License

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override/*ww w  .j av a2 s.c om*/
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();

    final String pageId = getPageId(parameters);

    final DataContainer<DocumentElement, String> documentElementDataContainer = getApplicationManager()
            .getDataContainer(DocumentElement.class);

    final DataContainer<DocumentStatusContainer, String> documentStatusContainerDataContainer = getApplicationManager()
            .getDataContainer(DocumentStatusContainer.class);

    getApplicationManager().getDataContainer(CommitteeProposalComponentData.class);

    final DocumentElement documentElement = documentElementDataContainer.load(pageId);

    if (documentElement != null) {

        getDocumentMenuItemFactory().createDocumentMenuBar(menuBar, pageId);

        final DocumentStatusContainer documentStatusContainer = documentStatusContainerDataContainer
                .findByQueryProperty(DocumentStatusContainer.class, DocumentStatusContainer_.document,
                        DocumentData.class, DocumentData_.id, pageId);

        LabelFactory.createHeader2Label(panelContent, OVERVIEW);

        final VerticalLayout overviewLayout = new VerticalLayout();
        overviewLayout.setSizeFull();

        panelContent.addComponent(overviewLayout);
        panelContent.setExpandRatio(overviewLayout, ContentRatio.LARGE_FORM);

        getDocumentMenuItemFactory().createOverviewPage(overviewLayout, pageId);

        getFormFactory().addFormPanelTextFields(panelContent, new BeanItem<>(documentElement),
                DocumentElement.class,
                Arrays.asList(new String[] { "id", "org", "documentType", "subType", "rm", "status", "title",
                        "subTitle", "madePublicDate", "createdDate", "systemDate", "relatedId", "label",
                        "tempLabel", "numberValue", "kallId", "documentFormat" }));

        if (documentStatusContainer != null) {
            getFormFactory().addFormPanelTextFields(panelContent, new BeanItem<>(documentStatusContainer),
                    DocumentStatusContainer.class, Arrays.asList(new String[] { "documentCategory" }));

            getFormFactory().addFormPanelTextFields(panelContent,
                    new BeanItem<>(documentStatusContainer.getDocument()), DocumentData.class,
                    Arrays.asList(new String[] { "id", "org", "documentType", "subType", "rm", "status",
                            "title", "subTitle", "madePublicDate", "label", "tempLabel", "numberValue",
                            "hangarId", }));
        }

        panel.setContent(panelContent);
        getPageActionEventHelper().createPageEvent(ViewAction.VISIT_DOCUMENT_VIEW, ApplicationEventGroup.USER,
                NAME, parameters, pageId);
    }

    return panelContent;

}

From source file:com.hack23.cia.web.impl.ui.application.views.user.goverment.pagemode.MinistryOverviewPageModContentFactoryImpl.java

License:Apache License

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override//from   w  w  w .  j  av a  2s. c  o  m
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();

    final String pageId = getPageId(parameters);

    final DataContainer<ViewRiksdagenMinistry, String> dataContainer = getApplicationManager()
            .getDataContainer(ViewRiksdagenMinistry.class);

    final ViewRiksdagenMinistry viewRiksdagenMinistry = dataContainer.load(pageId);

    if (viewRiksdagenMinistry != null) {

        getMinistryMenuItemFactory().createMinistryMenuBar(menuBar, pageId);

        LabelFactory.createHeader2Label(panelContent, OVERVIEW);

        final VerticalLayout overviewLayout = new VerticalLayout();
        overviewLayout.setSizeFull();

        panelContent.addComponent(overviewLayout);
        panelContent.setExpandRatio(overviewLayout, ContentRatio.LARGE_FORM);

        getMinistryMenuItemFactory().createOverviewPage(overviewLayout, pageId);

        final Link addMinistryPageLink = getPageLinkFactory().addMinistryPageLink(viewRiksdagenMinistry);
        panelContent.addComponent(addMinistryPageLink);

        getFormFactory().addFormPanelTextFields(panelContent, new BeanItem<>(viewRiksdagenMinistry),
                ViewRiksdagenMinistry.class,
                Arrays.asList(new String[] { "nameId", "active", "firstAssignmentDate", "lastAssignmentDate",
                        "totalAssignments", "totalDaysServed", "currentMemberSize" }));

        panelContent.setExpandRatio(addMinistryPageLink, ContentRatio.SMALL);

        panel.setCaption(MINISTRY + viewRiksdagenMinistry.getNameId());
        getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_VIEW, ApplicationEventGroup.USER,
                NAME, parameters, pageId);

    }

    return panelContent;

}

From source file:com.hack23.cia.web.impl.ui.application.views.user.home.pagemode.UserHomeOverviewPageModContentFactoryImpl.java

License:Apache License

@Secured({ "ROLE_USER", "ROLE_ADMIN" })
@Override/*www . ja  va 2s .co m*/
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();

    final String pageId = getPageId(parameters);

    userHomeMenuItemFactory.createUserHomeMenuBar(menuBar, pageId);

    LabelFactory.createHeader2Label(panelContent, OVERVIEW);

    final Button logoutButton = new Button(LOGOUT, FontAwesome.SIGN_OUT);

    final LogoutRequest logoutRequest = new LogoutRequest();
    logoutRequest.setSessionId(RequestContextHolder.currentRequestAttributes().getSessionId());
    logoutButton.addClickListener(new LogoutClickListener(logoutRequest, getApplicationManager()));

    panelContent.addComponent(logoutButton);

    final DataContainer<UserAccount, Long> dataContainer = getApplicationManager()
            .getDataContainer(UserAccount.class);

    final Long userIdFromSecurityContext = UserContextUtil.getUserInternalIdFromSecurityContext();

    if (userIdFromSecurityContext == null) {
        UI.getCurrent().getNavigator().navigateTo(CommonsViews.MAIN_VIEW_NAME);
    } else {

        final UserAccount userAccount = dataContainer.load(userIdFromSecurityContext);

        getFormFactory().addFormPanelTextFields(panelContent, new BeanItem<>(userAccount), UserAccount.class,
                Arrays.asList(
                        new String[] { "username", "createdDate", "email", "country", "numberOfVisits" }));

        final DataContainer<ApplicationActionEvent, Long> eventDataContainer = getApplicationManager()
                .getDataContainer(ApplicationActionEvent.class);

        final BeanItemContainer<ApplicationActionEvent> politicianDocumentDataSource = new BeanItemContainer<>(
                ApplicationActionEvent.class,
                eventDataContainer.findOrderedListByProperty(ApplicationActionEvent_.userId,
                        userAccount.getUserId(), ApplicationActionEvent_.createdDate));

        getGridFactory().createBasicBeanItemGrid(panelContent, politicianDocumentDataSource,
                "ApplicationActionEvent",
                new String[] { "hjid", "createdDate", "eventGroup", "applicationOperation", "actionName",
                        "page", "pageMode", "elementId", "applicationMessage", "errorMessage",
                        "modelObjectVersion" },
                new String[] { "hjid", "userId", "sessionId", "modelObjectId", "modelObjectVersion" },
                new PageItemPropertyClickListener(AdminViews.ADMIN_APPLICATIONS_EVENTS_VIEW_NAME, "hjid"), null,
                null);

        panelContent.setExpandRatio(logoutButton, ContentRatio.SMALL);

    }

    panel.setCaption(USERHOME);

    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_USER_HOME_VIEW, ApplicationEventGroup.USER,
            NAME, parameters, pageId);

    return panelContent;

}

From source file:com.hack23.cia.web.impl.ui.application.views.user.party.pagemode.PartyOverviewPageModContentFactoryImpl.java

License:Apache License

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override/*w w  w .  j  av a  2s .  com*/
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();

    final String pageId = getPageId(parameters);

    final DataContainer<ViewRiksdagenParty, String> dataContainer = getApplicationManager()
            .getDataContainer(ViewRiksdagenParty.class);

    final DataContainer<ViewRiksdagenPartySummary, String> partySummarydataContainer = getApplicationManager()
            .getDataContainer(ViewRiksdagenPartySummary.class);

    final ViewRiksdagenParty viewRiksdagenParty = dataContainer.load(pageId);

    if (viewRiksdagenParty != null) {

        getPartyMenuItemFactory().createPartyMenuBar(menuBar, pageId);

        LabelFactory.createHeader2Label(panelContent, OVERVIEW);

        final VerticalLayout overviewLayout = new VerticalLayout();
        overviewLayout.setSizeFull();

        panelContent.addComponent(overviewLayout);
        panelContent.setExpandRatio(overviewLayout, ContentRatio.LARGE_FORM);

        getPartyMenuItemFactory().createOverviewPage(overviewLayout, pageId);

        final Link addPartyPageLink = getPageLinkFactory().addPartyPageLink(viewRiksdagenParty);
        panelContent.addComponent(addPartyPageLink);

        panelContent.setExpandRatio(addPartyPageLink, ContentRatio.SMALL);

        getFormFactory().addFormPanelTextFields(panelContent, new BeanItem<>(viewRiksdagenParty),
                ViewRiksdagenParty.class, Arrays.asList(new String[] { "partyName", "partyId", "headCount",
                        "partyNumber", "registeredDate", "website" }));

        final ViewRiksdagenPartySummary viewRiksdagenPartySummary = partySummarydataContainer.load(pageId);

        if (viewRiksdagenPartySummary != null) {

            getFormFactory().addFormPanelTextFields(panelContent, new BeanItem<>(viewRiksdagenPartySummary),
                    ViewRiksdagenPartySummary.class,
                    Arrays.asList(new String[] { "active", "firstAssignmentDate", "lastAssignmentDate",
                            "currentAssignments", "totalAssignments", "totalDaysServed", "activeEu",
                            "totalActiveEu", "totalDaysServedEu", "activeGovernment", "totalActiveGovernment",
                            "totalDaysServedGovernment", "activeCommittee", "totalActiveCommittee",
                            "totalDaysServedCommittee", "activeParliament", "totalActiveParliament",
                            "totalDaysServedParliament" }));

        }

        pageCompleted(parameters, panel, pageId, viewRiksdagenParty);
    }
    return panelContent;

}

From source file:com.hack23.cia.web.impl.ui.application.views.user.politician.pagemode.PoliticianOverviewPageModContentFactoryImpl.java

License:Apache License

/**
 * Creates the overview content./*from w w  w  .j  a va2s  . com*/
 *
 * @param panelContent
 *            the panel content
 * @param personData
 *            the person data
 * @param viewRiksdagenPolitician
 *            the view riksdagen politician
 * @param pageId
 */
private void createOverviewContent(final VerticalLayout panelContent, final PersonData personData,
        final ViewRiksdagenPolitician viewRiksdagenPolitician, final String pageId) {
    LabelFactory.createHeader2Label(panelContent, OVERVIEW);

    final VerticalLayout overviewLayout = new VerticalLayout();
    overviewLayout.setSizeFull();

    panelContent.addComponent(overviewLayout);
    panelContent.setExpandRatio(overviewLayout, ContentRatio.LARGE_FORM);

    getPoliticianMenuItemFactory().createOverviewPage(overviewLayout, pageId);

    final Link createPoliticianPageLink = getPageLinkFactory().createPoliticianPageLink(personData);
    panelContent.addComponent(createPoliticianPageLink);

    final Image image = new Image("",
            new ExternalResource(personData.getImageUrl192().replace("http://", "https://")));

    final HorizontalLayout horizontalLayout = new HorizontalLayout();
    horizontalLayout.setSizeFull();

    panelContent.addComponent(horizontalLayout);

    horizontalLayout.addComponent(image);

    getFormFactory().addFormPanelTextFields(horizontalLayout, new BeanItem<>(viewRiksdagenPolitician),
            ViewRiksdagenPolitician.class,
            Arrays.asList(new String[] { "firstName", "lastName", "gender", "bornYear", "party", "active",
                    "firstAssignmentDate", "lastAssignmentDate", "currentAssignments",
                    "currentMinistryAssignments", "currentSpeakerAssignments", "currentCommitteeAssignments",
                    "currentPartyAssignments", "totalMinistryAssignments", "totalCommitteeAssignments",
                    "totalSpeakerAssignments", "totalPartyAssignments", "totalAssignments", "totalDaysServed",
                    "activeEu", "totalDaysServedEu", "activeGovernment", "totalDaysServedGovernment",
                    "activeSpeaker", "totalDaysServedSpeaker", "activeCommittee", "totalDaysServedCommittee",
                    "activeParliament", "totalDaysServedParliament", "activeParty", "totalDaysServedParty" }));

    getGridFactory().createBasicBeanItemGrid(panelContent,
            new BeanItemContainer<>(DetailData.class, personData.getPersonDetailData().getDetailList()),
            "Detail", new String[] { "code", "detail" }, new String[] { "hjid", "intressentId", "detailType" },
            null, null, null);

    panelContent.setExpandRatio(createPoliticianPageLink, ContentRatio.SMALL);
    panelContent.setExpandRatio(horizontalLayout, ContentRatio.GRID);

}

From source file:com.hack23.cia.web.impl.ui.application.views.user.politician.pagemode.PoliticianRoleSummaryPageModContentFactoryImpl.java

License:Apache License

/**
 * Creates the role summary./*ww w . ja  v a 2s  . c o m*/
 *
 * @param roleSummaryLayoutTabsheet
 *            the role summary layout tabsheet
 * @param assignmentList
 *            the assignment list
 * @param viewRiksdagenPolitician
 *            the view riksdagen politician
 */
private void createRoleSummary(final VerticalLayout roleSummaryLayoutTabsheet,
        final List<AssignmentData> assignmentList, final ViewRiksdagenPolitician viewRiksdagenPolitician) {

    final VerticalLayout layout = new VerticalLayout();
    layout.setSizeFull();

    layout.addComponent(new Label(TOTAL_ASSIGNMENTS + assignmentList.size()));

    if (viewRiksdagenPolitician != null) {

        layout.addComponent(new Label(GOVERNMENT_EXPERIENCE
                + convertToYearsString(viewRiksdagenPolitician.getTotalDaysServedGovernment())));
        layout.addComponent(new Label(SPEAKER_EXPERIENCE
                + convertToYearsString(viewRiksdagenPolitician.getTotalDaysServedSpeaker())));
        layout.addComponent(new Label(COMMITTEE_EXPERIENCE
                + convertToYearsString(viewRiksdagenPolitician.getTotalDaysServedCommittee())));
        layout.addComponent(new Label(
                EU_EXPERIENCE + convertToYearsString(viewRiksdagenPolitician.getTotalDaysServedEu())));
        layout.addComponent(new Label(PARLIAMENT_EXPERIENCE
                + convertToYearsString(viewRiksdagenPolitician.getTotalDaysServedParliament())));
        layout.addComponent(new Label(
                PARTY_EXPERIENCE + convertToYearsString(viewRiksdagenPolitician.getTotalDaysServedParty())));
    }

    roleSummaryLayoutTabsheet.addComponent(layout);
    roleSummaryLayoutTabsheet.setExpandRatio(layout, ContentRatio.GRID);

}

From source file:com.haulmont.cuba.web.app.folders.CubaFoldersPane.java

License:Apache License

protected void createFoldersPaneLayout(Component appFoldersPane, Component searchFoldersPane) {
    if (appFoldersPane != null && searchFoldersPane != null) {
        vertSplit = new VerticalSplitPanel();
        vertSplit.setSplitPosition(verticalSplitPos);

        VerticalLayout afLayout = new VerticalLayout();
        afLayout.setSpacing(true);//from w ww . j a v a 2 s.  com
        afLayout.setSizeFull();
        if (appFoldersLabel != null)
            addFoldersLabel(afLayout, appFoldersLabel);
        afLayout.addComponent(appFoldersPane);
        afLayout.setExpandRatio(appFoldersPane, 1);
        vertSplit.setFirstComponent(afLayout);

        VerticalLayout sfLayout = new VerticalLayout();
        sfLayout.setSpacing(true);
        sfLayout.setSizeFull();
        if (searchFoldersLabel != null)
            addFoldersLabel(sfLayout, searchFoldersLabel);
        sfLayout.addComponent(searchFoldersPane);
        sfLayout.setExpandRatio(searchFoldersPane, 1);
        vertSplit.setSecondComponent(sfLayout);

        addComponent(vertSplit);
    } else {
        if (appFoldersPane != null) {
            if (appFoldersLabel != null)
                addFoldersLabel(this, appFoldersLabel);
            addComponent(appFoldersPane);
            setExpandRatio(appFoldersPane, 1);
        }
        if (searchFoldersPane != null) {
            if (searchFoldersLabel != null)
                addFoldersLabel(this, searchFoldersLabel);
            addComponent(searchFoldersPane);
            setExpandRatio(searchFoldersPane, 1);
        }
    }
}