com.vaadin.ui.Panel.setContent() - java examples

Here are the examples of the java api com.vaadin.ui.Panel.setContent() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

80 Examples 7

19 View Complete Implementation : Wizard.java
Copyright Apache License 2.0
Author : tehapo
protected void activateStep(WizardStep step) {
    if (step == null) {
        return;
    }
    if (currentStep != null) {
        if (currentStep.equals(step)) {
            // already active
            return;
        }
        // ask if we're allowed to move
        boolean advancing = steps.indexOf(step) > steps.indexOf(currentStep);
        if (advancing) {
            if (!currentStep.onAdvance()) {
                // not allowed to advance
                return;
            }
        } else {
            if (!currentStep.onBack()) {
                // not allowed to go back
                return;
            }
        }
        // keep track of the last step that was completed
        int currentIndex = steps.indexOf(currentStep);
        if (lastCompletedStep == null || steps.indexOf(lastCompletedStep) < currentIndex) {
            lastCompletedStep = currentStep;
        }
        saveScrollPosition(currentStep);
    }
    contentPanel.setContent(step.getContent());
    currentStep = step;
    restoreScrollPosition(currentStep);
    updateUriFragment();
    updateButtons();
    fireEvent(new WizardStepActivationEvent(this, step));
}

19 View Complete Implementation : RegexpEditorComponent.java
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private Panel buildPanelTester() {
    // common part: create layout
    panelTester = new Panel();
    panelTester.setCaption("Test The Expression");
    panelTester.setImmediate(false);
    panelTester.setWidth("-1px");
    panelTester.setHeight("-1px");
    // verticalLayout_2
    verticalLayout_2 = buildVerticalLayout_2();
    panelTester.setContent(verticalLayout_2);
    return panelTester;
}

19 View Complete Implementation : CmsBasicDialog.java
Copyright GNU Lesser General Public License v2.1
Author : alkacon
/**
 * Sets the content.<p>
 *
 * @param content the content widget
 */
public void setContent(Component content) {
    m_contentPanel.setContent(content);
    if (content instanceof Layout.MarginHandler) {
        ((Layout.MarginHandler) content).setMargin(true);
    }
}

19 View Complete Implementation : CmsUpdateStep05Modules.java
Copyright GNU Lesser General Public License v2.1
Author : alkacon
/**
 * @see org.opencms.setup.updater.dialogs.A_CmsUpdateDialog#submitDialog()
 */
@Override
protected boolean submitDialog() {
    if (!m_isDone) {
        fetchModulesFromDialog();
        m_ui.getUpdateBean().prepareUpdateStep5();
        m_mainLayout.setVisible(false);
        m_reportLayout.setVisible(true);
        m_finished.setVisible(false);
        m_reportPanel.setContent(getReportContent());
    }
    return m_isDone;
}

19 View Complete Implementation : CmsFileHistoryClear.java
Copyright GNU Lesser General Public License v2.1
Author : alkacon
/**
 * Starts the clean thread and shows the report.<p>
 * Hides other formular elements, except for cancel button.<p>
 */
void startCleanAndShowReport() {
    // Start clean process in thread
    A_CmsReportThread thread = startThread();
    // Update UI
    m_optionPanel.setVisible(false);
    m_reportPanel.setVisible(true);
    CmsReportWidget report = new CmsReportWidget(thread);
    report.setWidth("100%");
    report.setHeight("700px");
    m_reportPanel.setContent(report);
    m_ok.setEnabled(false);
}

19 View Complete Implementation : ListPane.java
Copyright Apache License 2.0
Author : chelu
private void select(MenuItem item) {
    if (item.equals(itemSelected))
        // nothing to do
        return;
    selected.setCaption(item.getCaption());
    Component c = item.getComponent();
    selected.setContent(c);
    if (c instanceof ListPaneAware) {
        ((ListPaneAware) c).show();
    }
    item.setStyleName("menuItem-selected");
    if (itemSelected != null)
        itemSelected.setStyleName("menuItem");
    itemSelected = item;
}

19 View Complete Implementation : DemoUI.java
Copyright Apache License 2.0
Author : tehapo
private void updateResultPanel(String xml) {
    try {
        Component c = Clara.create(new ByteArrayInputStream(xml.getBytes()), controller);
        resultPanel.setContent(c);
    } catch (BinderException e) {
        Notification.show(e.getMessage(), Notification.Type.ERROR_MESSAGE);
    }
}

19 View Complete Implementation : HelpSplitPanel.java
Copyright GNU General Public License v3.0
Author : rlsutton1
private void showHelpLoadingSplash() {
    VerticalLayout splashHolder = new VerticalLayout();
    splashHolder.setSizeFull();
    Label splashLabel = new Label("<h2><br><br><b><center>Loading help, Please wait...<b>", ContentMode.HTML);
    splashHolder.addComponent(splashLabel);
    splashHolder.setComponentAlignment(splashLabel, Alignment.MIDDLE_RIGHT);
    helpPane.setContent(splashHolder);
    helpPane.setSizeFull();
}

19 View Complete Implementation : CmsToolLayout.java
Copyright GNU Lesser General Public License v2.1
Author : alkacon
/**
 * Sets the main component.<p>
 *
 * @param component the main component
 */
public void setMainContent(Component component) {
    component.addStyleName("borderless");
    m_main.setContent(component);
}

19 View Complete Implementation : MyUI.java
Copyright Apache License 2.0
Author : vaadin
@Override
public void showView(View view) {
    springViewDisplay.setContent((Component) view);
}

19 View Complete Implementation : MainLayout.java
Copyright Apache License 2.0
Author : markoradinovic
@Override
public void showView(View view) {
    if (security.hasAuthority("ROLE_USER")) {
        displayUserNavbar();
    } else if (security.hasAuthority("ROLE_ADMIN")) {
        displayAdminNavbar();
    } else {
        displayAnonymousNavbar();
    }
    if (view instanceof MvpPresenterView) {
        viewContainer.setContent(((MvpPresenterView) view).getViewComponent());
    }
}

18 View Complete Implementation : CmsImageDiff.java
Copyright GNU Lesser General Public License v2.1
Author : alkacon
/**
 * @see org.opencms.ui.dialogs.history.diff.I_CmsDiffProvider#diff(org.opencms.file.CmsObject, org.opencms.gwt.shared.CmsHistoryResourceBean, org.opencms.gwt.shared.CmsHistoryResourceBean)
 */
public Optional<Component> diff(CmsObject cms, CmsHistoryResourceBean v1, CmsHistoryResourceBean v2) throws CmsException {
    CmsResource r1 = A_CmsAttributeDiff.readResource(cms, v1);
    if (OpenCms.getResourceManager().matchResourceType(CmsResourceTypeImage.getStaticTypeName(), r1.getTypeId())) {
        HorizontalLayout hl = new HorizontalLayout();
        hl.setSpacing(true);
        String v1Param = v1.getVersion().getVersionNumber() != null ? "" + v1.getVersion().getVersionNumber() : "" + CmsHistoryResourceHandler.PROJECT_OFFLINE_VERSION;
        String v2Param = v2.getVersion().getVersionNumber() != null ? "" + v2.getVersion().getVersionNumber() : "" + CmsHistoryResourceHandler.PROJECT_OFFLINE_VERSION;
        String link1 = OpenCms.getLinkManager().subsreplaceduteLinkForUnknownTarget(cms, CmsHistoryListUtil.getHistoryLink(cms, v1.getStructureId(), v1Param));
        String link2 = OpenCms.getLinkManager().subsreplaceduteLinkForUnknownTarget(cms, CmsHistoryListUtil.getHistoryLink(cms, v2.getStructureId(), v2Param));
        int scaleWidth = 400;
        int scaleHeight = (2 * scaleWidth) / 3;
        // scale type 1 for thumbnails (no enlargement)
        final String scaleParams = "w:" + scaleWidth + ",h:" + scaleHeight + ",t:1";
        link1 = CmsRequestUtil.appendParameter(link1, "__scale", scaleParams);
        link2 = CmsRequestUtil.appendParameter(link2, "__scale", scaleParams);
        Image img1 = new Image("", new ExternalResource(link1));
        Image img2 = new Image("", new ExternalResource(link2));
        for (Image img : new Image[] { img1, img2 }) {
            img.setWidth("" + scaleWidth + "px");
        }
        img1.setCaption("V1");
        img2.setCaption("V2");
        hl.addComponent(img1);
        hl.addComponent(img2);
        Panel result = new Panel("Image comparison");
        hl.setMargin(true);
        result.setContent(hl);
        return Optional.fromNullable((Component) result);
    } else {
        return Optional.absent();
    }
}

18 View Complete Implementation : DocumentOverviewPageModContentFactoryImpl.java
Copyright Apache License 2.0
Author : Hack23
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();
    final String pageId = getPageId(parameters);
    final DoreplacedentElement doreplacedentElement = gereplacedem(parameters);
    getDoreplacedentMenuItemFactory().createDoreplacedentMenuBar(menuBar, pageId);
    final DataContainer<DoreplacedentStatusContainer, String> doreplacedentStatusContainerDataContainer = getApplicationManager().getDataContainer(DoreplacedentStatusContainer.clreplaced);
    final DoreplacedentStatusContainer doreplacedentStatusContainer = doreplacedentStatusContainerDataContainer.findByQueryProperty(DoreplacedentStatusContainer.clreplaced, DoreplacedentStatusContainer_.doreplacedent, DoreplacedentData.clreplaced, DoreplacedentData_.id, pageId);
    LabelFactory.createHeader2Label(panelContent, OVERVIEW);
    getFormFactory().addFormPanelTextFields(panelContent, doreplacedentElement, DoreplacedentElement.clreplaced, AS_LIST);
    if (doreplacedentStatusContainer != null) {
        getFormFactory().addFormPanelTextFields(panelContent, doreplacedentStatusContainer, DoreplacedentStatusContainer.clreplaced, AS_LIST3);
        getFormFactory().addFormPanelTextFields(panelContent, doreplacedentStatusContainer.getDoreplacedent(), DoreplacedentData.clreplaced, AS_LIST2);
    }
    final VerticalLayout overviewLayout = new VerticalLayout();
    overviewLayout.setSizeFull();
    panelContent.addComponent(overviewLayout);
    panelContent.setExpandRatio(overviewLayout, ContentRatio.LARGE_FORM);
    getDoreplacedentMenuItemFactory().createOverviewPage(overviewLayout, pageId);
    panel.setContent(panelContent);
    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_DOreplacedENT_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId);
    return panelContent;
}

18 View Complete Implementation : DocumentReferencesPageModContentFactoryImpl.java
Copyright Apache License 2.0
Author : Hack23
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();
    final String pageId = getPageId(parameters);
    getDoreplacedentMenuItemFactory().createDoreplacedentMenuBar(menuBar, pageId);
    final DataContainer<DoreplacedentStatusContainer, String> doreplacedentStatusContainerDataContainer = getApplicationManager().getDataContainer(DoreplacedentStatusContainer.clreplaced);
    final DoreplacedentStatusContainer doreplacedentStatusContainer = doreplacedentStatusContainerDataContainer.findByQueryProperty(DoreplacedentStatusContainer.clreplaced, DoreplacedentStatusContainer_.doreplacedent, DoreplacedentData.clreplaced, DoreplacedentData_.id, pageId);
    LabelFactory.createHeader2Label(panelContent, DOreplacedENT_REFERENCES);
    if (doreplacedentStatusContainer != null && doreplacedentStatusContainer.getDoreplacedentReferenceContainer() != null && doreplacedentStatusContainer.getDoreplacedentReferenceContainer().getDoreplacedentReferenceList() != null) {
        getGridFactory().createBasicBeanItemGrid(panelContent, DoreplacedentReferenceData.clreplaced, doreplacedentStatusContainer.getDoreplacedentReferenceContainer().getDoreplacedentReferenceList(), DOreplacedENT_REFERENCES2, COLUMN_ORDER, HIDE_COLUMNS, null, null, null);
    }
    panel.setContent(panelContent);
    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_DOreplacedENT_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId);
    return panelContent;
}

18 View Complete Implementation : UserHomeSecuritySettingsPageModContentFactoryImpl.java
Copyright Apache License 2.0
Author : Hack23
/**
 * Creates the change preplacedword button.
 *
 * @return the vertical layout
 */
private VerticalLayout createChangePreplacedwordButton() {
    final VerticalLayout formLayout = new VerticalLayout();
    formLayout.setSizeFull();
    final Panel formPanel = new Panel();
    formPanel.setSizeFull();
    formLayout.addComponent(formPanel);
    final FormLayout formContent = new FormLayout();
    formPanel.setContent(formContent);
    final ChangePreplacedwordRequest request = new ChangePreplacedwordRequest();
    request.setSessionId(RequestContextHolder.currentRequestAttributes().getSessionId());
    request.setCurrentPreplacedword("");
    request.setNewPreplacedword("");
    request.setRepeatNewPreplacedword("");
    final ClickListener listener = new ChangePreplacedwordClickListener(request);
    getFormFactory().addRequestInputFormFields(formContent, request, ChangePreplacedwordRequest.clreplaced, Arrays.asList("currentPreplacedword", "newPreplacedword", "repeatNewPreplacedword"), "Change preplacedword", listener);
    return formLayout;
}

18 View Complete Implementation : TagDialog.java
Copyright GNU General Public License v3.0
Author : JumpMind
private void initWindow(Object selectedItem) {
    Panel tagPanel = new Panel("Select tags");
    tagPanel.addStyleName(ValoTheme.PANEL_SCROLL_INDICATOR);
    tagPanel.setSizeFull();
    VerticalLayout tagLayout = new VerticalLayout();
    tagLayout.setMargin(true);
    addTagObjects(tagLayout, selectedItem);
    tagPanel.setContent(tagLayout);
    addComponent(tagPanel, 1);
    addComponent(buildButtonFooter(buildCloseButton()));
    setWidth(400, Unit.PIXELS);
    setHeight(500, Unit.PIXELS);
}

18 View Complete Implementation : CmsTextDiff.java
Copyright GNU Lesser General Public License v2.1
Author : alkacon
/**
 * @see org.opencms.ui.dialogs.history.diff.I_CmsDiffProvider#diff(org.opencms.file.CmsObject, org.opencms.gwt.shared.CmsHistoryResourceBean, org.opencms.gwt.shared.CmsHistoryResourceBean)
 */
public Optional<Component> diff(CmsObject cms, CmsHistoryResourceBean v1, CmsHistoryResourceBean v2) throws CmsException {
    CmsResource resource1 = A_CmsAttributeDiff.readResource(cms, v1);
    String encoding = CmsLocaleManager.getResourceEncoding(cms, resource1);
    I_CmsResourceType type = OpenCms.getResourceManager().getResourceType(resource1);
    if ((type instanceof CmsResourceTypeXmlContent) || (type instanceof CmsResourceTypePlain) || (type instanceof CmsResourceTypeJsp) || (type instanceof CmsResourceTypeXmlPage) || (type instanceof CmsResourceTypePointer) || (type instanceof CmsResourceTypeBinary)) {
        CmsResource resource2 = A_CmsAttributeDiff.readResource(cms, v2);
        String path1 = resource1.getRootPath();
        String path2 = resource2.getRootPath();
        CmsFile file1 = cms.readFile(resource1);
        CmsFile file2 = cms.readFile(resource2);
        byte[] content1 = file1.getContents();
        byte[] content2 = file2.getContents();
        String originalSource = null;
        String copySource = null;
        I_CmsTextExtractor textExtractor = null;
        // only if both files have contents
        if ((content1.length > 0) && (content2.length > 0)) {
            if (path1.endsWith(".pdf") && path2.endsWith(".pdf")) {
                textExtractor = CmsExtractorPdf.getExtractor();
            } else if (path1.endsWith(".doc") && path2.endsWith(".doc")) {
                textExtractor = CmsExtractorMsOfficeOLE2.getExtractor();
            } else if (path1.endsWith(".xls") && path2.endsWith(".xls")) {
                textExtractor = CmsExtractorMsOfficeOLE2.getExtractor();
            } else if (path1.endsWith(".rtf") && path2.endsWith(".rtf")) {
                textExtractor = CmsExtractorRtf.getExtractor();
            } else if (path1.endsWith(".ppt") && path2.endsWith(".ppt")) {
                textExtractor = CmsExtractorMsOfficeOLE2.getExtractor();
            }
        }
        if (textExtractor != null) {
            try {
                // extract the content
                originalSource = textExtractor.extractText(content1).getContent();
                copySource = textExtractor.extractText(content2).getContent();
            } catch (Exception e) {
                // something goes wrong on extracting content
                // set the content to null, so the content dialog will not be shown
                originalSource = null;
                copySource = null;
                LOG.error(e.getMessage(), e);
            }
        } else if ((type instanceof CmsResourceTypePlain) || (type instanceof CmsResourceTypeJsp) || (type instanceof CmsResourceTypePointer)) {
            try {
                originalSource = new String(content1, encoding);
                copySource = new String(content2, encoding);
            } catch (UnsupportedEncodingException e) {
                LOG.error(e.getLocalizedMessage(), e);
            }
        }
        if ((copySource == null) || (originalSource == null)) {
            return Optional.absent();
        }
        try {
            CmsTextDiffPanel diffPanel = new CmsTextDiffPanel(originalSource, copySource, false, true);
            diffPanel.setWidth("100%");
            Panel panel = new Panel(CmsVaadinUtils.getMessageText(Messages.GUI_HISTORY_DIALOG_TEXT_COMPARISON_CAPTION_0));
            panel.setWidth("100%");
            VerticalLayout vl = new VerticalLayout();
            vl.setMargin(true);
            vl.addComponent(diffPanel);
            panel.setContent(vl);
            return Optional.<Component>fromNullable(panel);
        } catch (Exception e) {
            LOG.error(e.getLocalizedMessage(), e);
            return Optional.absent();
        }
    } else {
        return Optional.absent();
    }
}

18 View Complete Implementation : DocBrowserController.java
Copyright Apache License 2.0
Author : korpling
public void openDocVis(String corpus, String doc, Visualizer visConfig, Button btn) {
    final String canonicalreplacedle = corpus + " > " + doc + " - " + "Visualizer: " + visConfig.getDisplayName();
    final String tabCaption = StringUtils.substring(canonicalreplacedle, 0, 15) + "...";
    if (visibleVisHolder.containsKey(canonicalreplacedle)) {
        Panel visHolder = visibleVisHolder.get(canonicalreplacedle);
        ui.getSearchView().getTabSheet().setSelectedTab(visHolder);
        return;
    }
    Panel visHolder = new Panel();
    visHolder.setSizeFull();
    visHolder.addDetachListener(new ClientConnector.DetachListener() {

        @Override
        public void detach(ClientConnector.DetachEvent event) {
            visibleVisHolder.remove(canonicalreplacedle);
        }
    });
    // first set loading indicator
    ProgressBar progressBar = new ProgressBar(1.0f);
    progressBar.setIndeterminate(true);
    progressBar.setSizeFull();
    VerticalLayout layoutProgress = new VerticalLayout(progressBar);
    layoutProgress.setSizeFull();
    layoutProgress.setComponentAlignment(progressBar, Alignment.MIDDLE_CENTER);
    visHolder.setContent(layoutProgress);
    Tab visTab = ui.getSearchView().getTabSheet().addTab(visHolder, tabCaption);
    visTab.setDescription(canonicalreplacedle);
    visTab.setIcon(EYE_ICON);
    visTab.setClosable(true);
    ui.getSearchView().getTabSheet().setSelectedTab(visTab);
    // register visible visHolder
    this.visibleVisHolder.put(canonicalreplacedle, visHolder);
    Background.run(new DocVisualizerFetcher(corpus, doc, canonicalreplacedle, visConfig.getType(), visHolder, visConfig, btn, ui));
}

18 View Complete Implementation : RawTextVisualizer.java
Copyright Apache License 2.0
Author : korpling
@Override
public Panel createComponent(VisualizerInput visInput, VisualizationToggle visToggle) {
    // get config for alignment
    boolean vertical = Boolean.parseBoolean(visInput.getMappings().getProperty("vertical", "true"));
    // get the texts
    RawTextWrapper texts = visInput.getRawText();
    // create the main panel
    Panel p = new Panel();
    p.setSizeFull();
    // some layout configuration
    p.addStyleName(ChameleonTheme.PANEL_BORDERLESS);
    p.addStyleName(PANEL_CLreplaced);
    // enable webfonts
    p.addStyleName(Helper.CORPUS_FONT_FORCE);
    Layout l;
    // if no text available inform user and exit
    if (texts == null) {
        Label text = new Label(NO_TEXT);
        text.addStyleName(LABEL_CLreplaced);
        text.setSizeFull();
        p.setContent(text);
        return p;
    }
    if (texts.hasMultipleTexts()) {
        // set the aligmnent
        if (vertical) {
            l = new VerticalLayout();
        } else {
            l = new GridLayout(texts.getTexts().size(), 1);
        }
        // limit the size to the parent panel.
        l.setSizeFull();
        // add the texts to the layout
        for (int i = 0; i < texts.getTexts().size(); i++) {
            String s = texts.getTexts().get(i);
            Label lblText;
            // check if the text is empty
            if (s == null || hasOnlyWhiteSpace(s)) {
                lblText = new Label(NO_TEXT);
            } else {
                lblText = new Label(s, ContentMode.TEXT);
            }
            if (!Helper.isRTLDisabled(visInput.getUI()) && CommonHelper.containsRTLText(s)) {
                lblText.addStyleName("rtl");
            }
            lblText.setCaption("text " + (i + 1));
            lblText.addStyleName(LABEL_CLreplaced);
            lblText.setWidth(98, Sizeable.Unit.PERCENTAGE);
            l.addComponent(lblText);
        }
        // apply the panel
        p.setContent(l);
        return p;
    }
    Label lblText;
    if (texts.hasTexts() && !hasOnlyWhiteSpace(texts.getFirstText())) {
        lblText = new Label(texts.getFirstText(), ContentMode.TEXT);
        if (!Helper.isRTLDisabled(visInput.getUI()) && CommonHelper.containsRTLText(texts.getFirstText())) {
            lblText.addStyleName("rtl");
        }
    } else {
        lblText = new Label(NO_TEXT);
    }
    lblText.setSizeFull();
    lblText.addStyleName(LABEL_CLreplaced);
    p.setContent(lblText);
    return p;
}

18 View Complete Implementation : CmsUpdateStep03DBThreadDialog.java
Copyright GNU Lesser General Public License v2.1
Author : alkacon
/**
 * @see org.opencms.setup.updater.dialogs.A_CmsUpdateDialog#init(org.opencms.setup.CmsUpdateUI)
 */
@Override
public boolean init(CmsUpdateUI ui) {
    CmsVaadinUtils.readAndLocalizeDesign(this, null, null);
    super.init(ui, false, true);
    setCaption("OpenCms Update-Wizard - Update database");
    m_icon.setContentMode(ContentMode.HTML);
    m_icon.setValue(FontAwesome.CLOCK_O.getHtml());
    m_iconFin.setContentMode(ContentMode.HTML);
    m_iconFin.setValue(FontAwesome.CHECK_CIRCLE_O.getHtml());
    m_finished.setVisible(false);
    m_reportPanel.setContent(getReportContent());
    return true;
}

18 View Complete Implementation : SslCertificateUploader.java
Copyright Apache License 2.0
Author : opensecuritycontroller
protected void layout(Panel panel) {
    createUpload();
    this.verLayout.setSpacing(true);
    panel.setWidth("100%");
    panel.setContent(this.verLayout);
    this.verLayout.addComponent(this.upload);
    this.verLayout.addStyleName(StyleConstants.COMPONENT_SPACING);
}

18 View Complete Implementation : BaseDAWindow.java
Copyright Apache License 2.0
Author : opensecuritycontroller
/**
 * @return AZ Panel
 */
@SuppressWarnings("serial")
protected Panel getVirtualSystemPanel() {
    try {
        this.vsTable = new Table();
        this.vsTable.setPageLength(5);
        this.vsTable.setImmediate(true);
        this.vsTable.addGeneratedColumn("Enabled", new CheckBoxGenerator());
        this.vsTable.addItemClickListener(new ItemClickListener() {

            @Override
            public void itemClick(ItemClickEvent event) {
                vsTableClicked((Long) event.gereplacedemId());
            }
        });
        // populating VS table
        populateVirtualSystem();
        Panel vsPanel = new Panel("Virtualization System:");
        vsPanel.addStyleName("form_Panel");
        vsPanel.setWidth(100, Sizeable.Unit.PERCENTAGE);
        vsPanel.setContent(this.vsTable);
        return vsPanel;
    } catch (Exception e) {
        log.error("Error while creating DA's VS panel", e);
    }
    return null;
}

18 View Complete Implementation : RolloutConfigurationView.java
Copyright Eclipse Public License 1.0
Author : eclipse
private void init() {
    final Panel rootPanel = new Panel();
    rootPanel.setSizeFull();
    rootPanel.addStyleName("config-panel");
    final VerticalLayout vLayout = new VerticalLayout();
    vLayout.setMargin(true);
    vLayout.setSizeFull();
    final Label header = new Label(i18n.getMessage("configuration.rollout.replacedle"));
    header.addStyleName("config-panel-header");
    vLayout.addComponent(header);
    final GridLayout gridLayout = new GridLayout(3, 1);
    gridLayout.setSpacing(true);
    gridLayout.setImmediate(true);
    gridLayout.setColumnExpandRatio(1, 1.0F);
    gridLayout.setSizeFull();
    approvalCheckbox = SPUIComponentProvider.getCheckBox("", "", null, false, "");
    approvalCheckbox.setId(UIComponentIdProvider.ROLLOUT_APPROVAL_ENABLED_CHECKBOX);
    approvalCheckbox.setValue(approvalConfigurationItem.isConfigEnabled());
    approvalCheckbox.addValueChangeListener(this);
    approvalConfigurationItem.addChangeListener(this);
    gridLayout.addComponent(approvalCheckbox, 0, 0);
    gridLayout.addComponent(approvalConfigurationItem, 1, 0);
    final Link linkToApprovalHelp = SPUIComponentProvider.getHelpLink(i18n, uiProperties.getLinks().getDoreplacedentation().getRollout());
    gridLayout.addComponent(linkToApprovalHelp, 2, 0);
    gridLayout.setComponentAlignment(linkToApprovalHelp, Alignment.BOTTOM_RIGHT);
    vLayout.addComponent(gridLayout);
    rootPanel.setContent(vLayout);
    setCompositionRoot(rootPanel);
}

18 View Complete Implementation : TenantConfigurationDashboardView.java
Copyright Eclipse Public License 1.0
Author : eclipse
/**
 * Init method adds all Configuration Views to the list of Views.
 */
@PostConstruct
public void init() {
    if (defaultDistributionSetTypeLayout.getComponentCount() > 0) {
        configurationViews.add(defaultDistributionSetTypeLayout);
    }
    configurationViews.add(repositoryConfigurationView);
    configurationViews.add(rolloutConfigurationView);
    configurationViews.add(authenticationConfigurationView);
    configurationViews.add(pollingConfigurationView);
    if (customConfigurationViews != null) {
        configurationViews.addAll(customConfigurationViews.stream().filter(ConfigurationGroup::show).collect(Collectors.toList()));
    }
    final Panel rootPanel = new Panel();
    rootPanel.setStyleName("tenantconfig-root");
    final VerticalLayout rootLayout = new VerticalLayout();
    rootLayout.setSizeFull();
    rootLayout.setMargin(true);
    rootLayout.setSpacing(true);
    configurationViews.forEach(rootLayout::addComponent);
    final HorizontalLayout buttonContent = saveConfigurationButtonsLayout();
    rootLayout.addComponent(buttonContent);
    rootLayout.setComponentAlignment(buttonContent, Alignment.BOTTOM_LEFT);
    rootPanel.setContent(rootLayout);
    setCompositionRoot(rootPanel);
    configurationViews.forEach(view -> view.addChangeListener(this));
}

18 View Complete Implementation : EmailPageModContentFactoryImpl.java
Copyright Apache License 2.0
Author : Hack23
@Secured({ "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout content = createPanelContent();
    final String pageId = getPageId(parameters);
    getMenuItemFactory().createMainPageMenuBar(menuBar);
    LabelFactory.createHeader2Label(content, ADMIN_EMAIL);
    final VerticalLayout emailLayout = new VerticalLayout();
    emailLayout.setSizeFull();
    final Panel formPanel = new Panel();
    formPanel.setSizeFull();
    emailLayout.addComponent(formPanel);
    final FormLayout formContent = new FormLayout();
    formPanel.setContent(formContent);
    final SendEmailRequest sendEmailRequest = new SendEmailRequest();
    sendEmailRequest.setSessionId(RequestContextHolder.currentRequestAttributes().getSessionId());
    sendEmailRequest.setEmail("");
    sendEmailRequest.setSubject("");
    sendEmailRequest.setContent("");
    final ClickListener sendEmailListener = new SendEmailClickListener(sendEmailRequest);
    getFormFactory().addRequestInputFormFields(formContent, sendEmailRequest, SendEmailRequest.clreplaced, SEND_EMAIL_REQUEST_FORM_FIELDS, EMAIL, sendEmailListener);
    content.addComponent(emailLayout);
    content.setExpandRatio(emailLayout, ContentRatio.LARGE_FORM);
    panel.setCaption(NAME + "::" + ADMIN_EMAIL);
    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_ADMIN_EMAIL_VIEW, ApplicationEventGroup.ADMIN, NAME, null, pageId);
    return content;
}

18 View Complete Implementation : CmsCacheAdminApp.java
Copyright GNU Lesser General Public License v2.1
Author : alkacon
/**
 * Panel with java statistics.<p>
 *
 * @return vaadin component.
 */
public static Panel getJavaCacheStatsPanel() {
    Panel java = new Panel();
    java.setCaption(CmsVaadinUtils.getMessageText(Messages.GUI_CACHE_JAVA_HEAP_0));
    java.setContent(CmsCacheViewApp.getJavaStatisticButton().getInfoLayout());
    return java;
}

18 View Complete Implementation : AbstractChartDataManagerImpl.java
Copyright Apache License 2.0
Author : Hack23
/**
 * Adds the chart.
 *
 * @param content
 *            the content
 * @param caption
 *            the caption
 * @param chart
 *            the chart
 * @param fullPage
 *            the full page
 */
protected final void addChart(final AbstractOrderedLayout content, final String caption, final DCharts chart, final boolean fullPage) {
    final HorizontalLayout horizontalLayout = new HorizontalLayout();
    final int browserWindowWidth = getChartWindowWidth();
    final int browserWindowHeight = getChartWindowHeight(fullPage);
    horizontalLayout.setWidth(browserWindowWidth, Unit.PIXELS);
    horizontalLayout.setHeight(browserWindowHeight, Unit.PIXELS);
    horizontalLayout.setMargin(true);
    horizontalLayout.setSpacing(false);
    horizontalLayout.addStyleName("v-layout-content-overview-panel-level1");
    final Panel formPanel = new Panel();
    formPanel.setSizeFull();
    formPanel.setContent(horizontalLayout);
    formPanel.setCaption(caption);
    content.addComponent(formPanel);
    content.setExpandRatio(formPanel, ContentRatio.LARGE);
    chart.setWidth(100, Unit.PERCENTAGE);
    chart.setHeight(100, Unit.PERCENTAGE);
    chart.setMarginRight(CHART_RIGHT_MARGIN);
    chart.setMarginLeft(CHART_LEFT_MARGIN);
    chart.setMarginBottom(CHART_BOTTOM_MARGIN_SIZE);
    chart.setMarginTop(CHART_TOP_MARGIN_SIZE);
    horizontalLayout.addComponent(chart);
    chart.setCaption(caption);
}

18 View Complete Implementation : DocumentDetailsPageModContentFactoryImpl.java
Copyright Apache License 2.0
Author : Hack23
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();
    final String pageId = getPageId(parameters);
    getDoreplacedentMenuItemFactory().createDoreplacedentMenuBar(menuBar, pageId);
    final DataContainer<DoreplacedentStatusContainer, String> doreplacedentStatusContainerDataContainer = getApplicationManager().getDataContainer(DoreplacedentStatusContainer.clreplaced);
    final DoreplacedentStatusContainer doreplacedentStatusContainer = doreplacedentStatusContainerDataContainer.findByQueryProperty(DoreplacedentStatusContainer.clreplaced, DoreplacedentStatusContainer_.doreplacedent, DoreplacedentData.clreplaced, DoreplacedentData_.id, pageId);
    LabelFactory.createHeader2Label(panelContent, DOreplacedENT_DETAILS);
    if (doreplacedentStatusContainer != null && doreplacedentStatusContainer.getDoreplacedentDetailContainer() != null && doreplacedentStatusContainer.getDoreplacedentDetailContainer().getDoreplacedentDetailList() != null) {
        getGridFactory().createBasicBeanItemGrid(panelContent, DoreplacedentDetailData.clreplaced, doreplacedentStatusContainer.getDoreplacedentDetailContainer().getDoreplacedentDetailList(), DOreplacedENT_DETAILS2, COLUMN_ORDER, HIDE_COLUMNS, null, null, null);
    }
    panel.setContent(panelContent);
    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_DOreplacedENT_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId);
    return panelContent;
}

18 View Complete Implementation : A_CmsAttributeDiff.java
Copyright GNU Lesser General Public License v2.1
Author : alkacon
/**
 * @see org.opencms.ui.dialogs.history.diff.I_CmsDiffProvider#diff(org.opencms.file.CmsObject, org.opencms.gwt.shared.CmsHistoryResourceBean, org.opencms.gwt.shared.CmsHistoryResourceBean)
 */
public Optional<Component> diff(CmsObject cms, CmsHistoryResourceBean v1, CmsHistoryResourceBean v2) throws CmsException {
    List<CmsAttributeComparison> attrCompare = getDifferences(cms, v1, v2);
    if (attrCompare.isEmpty()) {
        return Optional.absent();
    }
    List<CmsPropertyCompareBean> compareBeans = Lists.newArrayList();
    for (CmsAttributeComparison comp : attrCompare) {
        compareBeans.add(new CmsPropertyCompareBean(comp));
    }
    CmsBeanTableBuilder<CmsPropertyCompareBean> builder = CmsBeanTableBuilder.newInstance(CmsPropertyCompareBean.clreplaced, A_CmsUI.get().getDisplayType().toString());
    builder.setMacroResolver(new CmsVersionMacroResolver(v1, v2));
    Table table = builder.buildTable(compareBeans);
    table.setSortEnabled(false);
    table.setWidth("100%");
    table.setPageLength(Math.min(12, compareBeans.size()));
    table.setStyleName(COMPARE_TABLE_MARKER);
    VerticalLayout vl = new VerticalLayout();
    vl.setMargin(true);
    vl.addComponent(table);
    Panel panel = new Panel(getCaption());
    panel.setContent(vl);
    return Optional.fromNullable((Component) panel);
}

18 View Complete Implementation : DocumentPersonReferencesPageModContentFactoryImpl.java
Copyright Apache License 2.0
Author : Hack23
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();
    final String pageId = getPageId(parameters);
    getDoreplacedentMenuItemFactory().createDoreplacedentMenuBar(menuBar, pageId);
    final DataContainer<DoreplacedentStatusContainer, String> doreplacedentStatusContainerDataContainer = getApplicationManager().getDataContainer(DoreplacedentStatusContainer.clreplaced);
    final DoreplacedentStatusContainer doreplacedentStatusContainer = doreplacedentStatusContainerDataContainer.findByQueryProperty(DoreplacedentStatusContainer.clreplaced, DoreplacedentStatusContainer_.doreplacedent, DoreplacedentData.clreplaced, DoreplacedentData_.id, pageId);
    LabelFactory.createHeader2Label(panelContent, PERSON_REFERENCES);
    if (doreplacedentStatusContainer != null && doreplacedentStatusContainer.getDoreplacedentPersonReferenceContainer() != null && doreplacedentStatusContainer.getDoreplacedentPersonReferenceContainer().getDoreplacedentPersonReferenceList() != null) {
        getGridFactory().createBasicBeanItemGrid(panelContent, DoreplacedentPersonReferenceData.clreplaced, doreplacedentStatusContainer.getDoreplacedentPersonReferenceContainer().getDoreplacedentPersonReferenceList(), DOreplacedENT_PERSON_REFERENCES, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null);
    }
    panel.setContent(panelContent);
    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_DOreplacedENT_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId);
    return panelContent;
}

18 View Complete Implementation : DocumentsOverviewPageModContentFactoryImpl.java
Copyright Apache License 2.0
Author : Hack23
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();
    final String pageId = getPageId(parameters);
    final int pageNr = getPageNr(parameters);
    getDoreplacedentMenuItemFactory().createDoreplacedentsMenuBar(menuBar);
    LabelFactory.createHeader2Label(panelContent, OVERVIEW);
    final DataContainer<DoreplacedentElement, String> doreplacedentElementDataContainer = getApplicationManager().getDataContainer(DoreplacedentElement.clreplaced);
    final List<DoreplacedentElement> pageOrderBy = doreplacedentElementDataContainer.getPageOrderBy(pageNr, DEFAULT_RESULTS_PER_PAGE, DoreplacedentElement_.createdDate);
    pagingUtil.createPagingControls(panelContent, NAME, pageId, doreplacedentElementDataContainer.getSize(), pageNr, DEFAULT_RESULTS_PER_PAGE);
    getGridFactory().createBasicBeanItemGrid(panelContent, DoreplacedentElement.clreplaced, pageOrderBy, DOreplacedENT, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null);
    panel.setContent(panelContent);
    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_DOreplacedENTS_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId);
    return panelContent;
}

18 View Complete Implementation : CmsShowVersionButtons.java
Copyright GNU Lesser General Public License v2.1
Author : alkacon
/**
 * @see org.opencms.ui.dialogs.history.diff.I_CmsDiffProvider#diff(org.opencms.file.CmsObject, org.opencms.gwt.shared.CmsHistoryResourceBean, org.opencms.gwt.shared.CmsHistoryResourceBean)
 */
public Optional<Component> diff(CmsObject cms, CmsHistoryResourceBean v1, CmsHistoryResourceBean v2) {
    Panel panel = new Panel("");
    panel.addStyleName(ValoTheme.PANEL_BORDERLESS);
    HorizontalLayout hl = new HorizontalLayout();
    panel.setContent(hl);
    hl.addComponent(createButton(cms, v1));
    hl.addComponent(createButton(cms, v2));
    VerticalLayout outerContainer = new VerticalLayout();
    outerContainer.addComponent(hl);
    outerContainer.setComponentAlignment(hl, Alignment.MIDDLE_RIGHT);
    outerContainer.setMargin(true);
    hl.setSpacing(true);
    return Optional.fromNullable((Component) outerContainer);
}

18 View Complete Implementation : MainViewLoginPageModContentFactoryImpl.java
Copyright Apache License 2.0
Author : Hack23
@Secured({ "ROLE_ANONYMOUS" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout content = createPanelContent();
    final String pageId = getPageId(parameters);
    panel.setCaption(NAME + "::" + CITIZEN_INTELLIGENCE_AGENCY_MAIN);
    getMenuItemFactory().createMainPageMenuBar(menuBar);
    final VerticalLayout loginLayout = new VerticalLayout();
    loginLayout.setSizeFull();
    final Panel formPanel = new Panel();
    formPanel.setSizeFull();
    loginLayout.addComponent(formPanel);
    final FormLayout formContent = new FormLayout();
    formContent.setIcon(VaadinIcons.SIGN_IN);
    formPanel.setContent(formContent);
    final LoginRequest loginRequest = new LoginRequest();
    loginRequest.setOtpCode("");
    loginRequest.setEmail("");
    loginRequest.setUserpreplacedword("");
    loginRequest.setSessionId(RequestContextHolder.currentRequestAttributes().getSessionId());
    final ClickListener loginListener = new ApplicationLoginListener(loginRequest);
    getFormFactory().addRequestInputFormFields(formContent, loginRequest, LoginRequest.clreplaced, AS_LIST, LOGIN, loginListener);
    final VerticalLayout overviewLayout = new VerticalLayout();
    overviewLayout.setSizeFull();
    content.addComponent(overviewLayout);
    content.setExpandRatio(overviewLayout, ContentRatio.LARGE);
    final ResponsiveRow grid = RowUtil.createGridLayout(overviewLayout);
    RowUtil.createRowComponent(grid, loginLayout, LOGIN_USER);
    panel.setCaption(NAME + "::" + CITIZEN_INTELLIGENCE_AGENCY_MAIN);
    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MAIN_VIEW, ApplicationEventGroup.USER, CommonsViews.MAIN_VIEW_NAME, parameters, pageId);
    return content;
}

18 View Complete Implementation : CmsCacheAdminApp.java
Copyright GNU Lesser General Public License v2.1
Author : alkacon
/**
 * Creates the component to be shown on accessing the app with some statistical information about the caches.<p>
 *
 * @return a vaadin vertical layout component
 */
private Component getStartComponent() {
    VerticalLayout outerouter = new VerticalLayout();
    VerticalLayout outer = new VerticalLayout();
    outer.setSizeUndefined();
    HorizontalLayout layout = new HorizontalLayout();
    layout.setMargin(true);
    layout.setSpacing(true);
    layout.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING);
    // Statistic about heap space
    layout.addComponent(getJavaCacheStatsPanel());
    Panel flex = new Panel();
    // flex.setWidth("400px");
    flex.setContent(CmsCacheViewApp.getFlexStatisticButton().getInfoLayout());
    flex.setCaption(CmsVaadinUtils.getMessageText(Messages.GUI_CACHE_FLEX_0));
    HorizontalLayout flush = new HorizontalLayout();
    flush.addComponent(new CmsFlushCache());
    flush.setMargin(true);
    layout.addComponent(flex);
    outer.addComponent(flush);
    outer.addComponent(layout);
    outerouter.addStyleName("o-center");
    outerouter.addComponent(outer);
    return outerouter;
}

18 View Complete Implementation : MainViewRegisterPageModContentFactoryImpl.java
Copyright Apache License 2.0
Author : Hack23
@Secured({ "ROLE_ANONYMOUS" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout content = createPanelContent();
    final String pageId = getPageId(parameters);
    getMenuItemFactory().createMainPageMenuBar(menuBar);
    final VerticalLayout registerLayout = new VerticalLayout();
    registerLayout.setSizeFull();
    final Panel formPanel = new Panel();
    formPanel.setSizeFull();
    registerLayout.addComponent(formPanel);
    final FormLayout formContent = new FormLayout();
    formPanel.setContent(formContent);
    final RegisterUserRequest reqisterRequest = new RegisterUserRequest();
    reqisterRequest.setSessionId(RequestContextHolder.currentRequestAttributes().getSessionId());
    reqisterRequest.setUsername("");
    reqisterRequest.setEmail("");
    reqisterRequest.setCountry("");
    reqisterRequest.setUserpreplacedword("");
    final ClickListener reqisterListener = new RegisterUserClickListener(reqisterRequest);
    getFormFactory().addRequestInputFormFields(formContent, reqisterRequest, RegisterUserRequest.clreplaced, AS_LIST, REGISTER, reqisterListener);
    final VerticalLayout overviewLayout = new VerticalLayout();
    overviewLayout.setSizeFull();
    content.addComponent(overviewLayout);
    content.setExpandRatio(overviewLayout, ContentRatio.LARGE);
    final ResponsiveRow grid = RowUtil.createGridLayout(overviewLayout);
    RowUtil.createRowComponent(grid, registerLayout, "Register a new user");
    panel.setCaption(NAME + "::" + CITIZEN_INTELLIGENCE_AGENCY_MAIN);
    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MAIN_VIEW, ApplicationEventGroup.USER, CommonsViews.MAIN_VIEW_NAME, parameters, pageId);
    return content;
}

18 View Complete Implementation : DocBrowserTable.java
Copyright Apache License 2.0
Author : korpling
private Panel generateVisualizerLinks(String docName) {
    Panel p = new Panel();
    VerticalLayout l = new VerticalLayout();
    p.addStyleName(ChameleonTheme.PANEL_BORDERLESS);
    if (docVisualizerConfig != null) {
        Visualizer[] visualizers = docVisualizerConfig.getVisualizers();
        if (visualizers != null) {
            for (Visualizer visualizer : visualizers) {
                Button openVis = new Button(visualizer.getDisplayName());
                openVis.setDescription("open visualizer with the full text of " + docName);
                openVis.addClickListener(new OpenVisualizerWindow(docName, visualizer, openVis));
                openVis.setStyleName(BaseTheme.BUTTON_LINK);
                openVis.setDisableOnClick(true);
                l.addComponent(openVis);
            }
        }
    }
    p.setContent(l);
    return p;
}

18 View Complete Implementation : CmsValueDiff.java
Copyright GNU Lesser General Public License v2.1
Author : alkacon
/**
 * @see org.opencms.ui.dialogs.history.diff.I_CmsDiffProvider#diff(org.opencms.file.CmsObject, org.opencms.gwt.shared.CmsHistoryResourceBean, org.opencms.gwt.shared.CmsHistoryResourceBean)
 */
public Optional<Component> diff(final CmsObject cms, CmsHistoryResourceBean v1, CmsHistoryResourceBean v2) throws CmsException {
    CmsResource resource1 = A_CmsAttributeDiff.readResource(cms, v1);
    I_CmsResourceType type = OpenCms.getResourceManager().getResourceType(resource1);
    CmsMacroResolver resolver = new CmsVersionMacroResolver(v1, v2);
    if ((type instanceof CmsResourceTypeXmlContent) || (type instanceof CmsResourceTypeXmlPage)) {
        CmsResource resource2 = A_CmsAttributeDiff.readResource(cms, v2);
        final Panel panel = new Panel(CmsVaadinUtils.getMessageText(Messages.GUI_HISTORY_DIALOG_CONTENT_VALUE_TABLE_CAPTION_0));
        final CmsFile file1 = cms.readFile(resource1);
        final CmsFile file2 = cms.readFile(resource2);
        VerticalLayout vl = new VerticalLayout();
        vl.setMargin(true);
        vl.setSpacing(true);
        Table table = buildValueComparisonTable(cms, panel, file1, file2, resolver);
        if (table.getContainerDataSource().size() == 0) {
            return Optional.absent();
        }
        Button fileTextCompareButton = new Button(CmsVaadinUtils.getMessageText(Messages.GUI_HISTORY_DIALOG_COMPARE_WHOLE_FILE_0));
        vl.addComponent(fileTextCompareButton);
        vl.setComponentAlignment(fileTextCompareButton, Alignment.MIDDLE_RIGHT);
        fileTextCompareButton.addClickListener(new ClickListener() {

            private static final long serialVersionUID = 1L;

            @SuppressWarnings("synthetic-access")
            public void buttonClick(ClickEvent event) {
                Component diffView = buildWholeFileDiffView(cms, file1, file2);
                CmsHistoryDialog.openChildDialog(panel, diffView, CmsVaadinUtils.getMessageText(Messages.GUI_HISTORY_DIALOG_COMPARE_WHOLE_FILE_0));
            }
        });
        vl.addComponent(table);
        panel.setContent(vl);
        Component result = panel;
        return Optional.fromNullable(result);
    } else {
        return Optional.absent();
    }
}

18 View Complete Implementation : HTMLVis.java
Copyright Apache License 2.0
Author : korpling
@Override
public Panel createComponent(VisualizerInput vi, VisualizationToggle vt) {
    Panel scrollPanel = new Panel();
    scrollPanel.setSizeFull();
    Label lblResult = new Label("ERROR", ContentMode.HTML);
    lblResult.setSizeUndefined();
    List<String> corpusPath = CommonHelper.getCorpusPath(vi.getDoreplacedent().getGraph(), vi.getDoreplacedent());
    String corpusName = corpusPath.get(corpusPath.size() - 1);
    corpusName = urlPathEscape.escape(corpusName);
    String wrapperClreplacedName = "annis-wrapped-htmlvis-" + corpusName.replaceAll("[^0-9A-Za-z-]", "_");
    scrollPanel.addStyleName(wrapperClreplacedName);
    String visConfigName = vi.getMappings().getProperty("config");
    String hitMarkConfig = vi.getMappings().getProperty("hitmark", "true");
    hitMark = Boolean.parseBoolean(hitMarkConfig);
    mc = vi.getMarkedAndCovered();
    VisualizationDefinition[] definitions = parseDefinitions(corpusName, vi.getMappings(), vi.getUI());
    if (definitions != null) {
        lblResult.setValue(createHTML(vi.getSResult().getDoreplacedentGraph(), definitions, vi.getUI()));
        String labelClreplaced = vi.getMappings().getProperty("clreplaced", "htmlvis");
        lblResult.addStyleName(labelClreplaced);
        injectWebFonts(visConfigName, corpusName, vi.getUI());
        injectCSS(visConfigName, corpusName, wrapperClreplacedName, vi.getUI());
    }
    if (vi.getMappings().containsKey("debug")) {
        TextArea txtDebug = new TextArea();
        txtDebug.setValue(lblResult.getValue());
        txtDebug.setReadOnly(true);
        txtDebug.setWidth("100%");
        Label sep = new Label("<hr/>", ContentMode.HTML);
        VerticalLayout layout = new VerticalLayout(txtDebug, sep, lblResult);
        layout.setSizeUndefined();
        scrollPanel.setContent(layout);
    } else {
        scrollPanel.setContent(lblResult);
    }
    return scrollPanel;
}

18 View Complete Implementation : DocumentActivityPageModContentFactoryImpl.java
Copyright Apache License 2.0
Author : Hack23
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();
    final String pageId = getPageId(parameters);
    getDoreplacedentMenuItemFactory().createDoreplacedentMenuBar(menuBar, pageId);
    final DataContainer<DoreplacedentStatusContainer, String> doreplacedentStatusContainerDataContainer = getApplicationManager().getDataContainer(DoreplacedentStatusContainer.clreplaced);
    final DoreplacedentStatusContainer doreplacedentStatusContainer = doreplacedentStatusContainerDataContainer.findByQueryProperty(DoreplacedentStatusContainer.clreplaced, DoreplacedentStatusContainer_.doreplacedent, DoreplacedentData.clreplaced, DoreplacedentData_.id, pageId);
    LabelFactory.createHeader2Label(panelContent, DOreplacedENT_ACTIVITY);
    if (doreplacedentStatusContainer != null && doreplacedentStatusContainer.getDoreplacedentActivityContainer() != null && doreplacedentStatusContainer.getDoreplacedentActivityContainer().getDoreplacedentActivities() != null) {
        getGridFactory().createBasicBeanItemGrid(panelContent, DoreplacedentActivityData.clreplaced, doreplacedentStatusContainer.getDoreplacedentActivityContainer().getDoreplacedentActivities(), DOreplacedENT_ACTIVITIES, COLUMN_ORDER, HIDE_COLUMNS, null, null, null);
    }
    panel.setContent(panelContent);
    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_DOreplacedENT_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId);
    return panelContent;
}

18 View Complete Implementation : CmsAppHierarchyPanel.java
Copyright GNU Lesser General Public License v2.1
Author : alkacon
/**
 * Adds a child category panel.<p>
 *
 * @param label the label
 * @param child the child widget
 */
public void addChild(String label, CmsAppHierarchyPanel child) {
    Panel panel = new Panel();
    panel.setCaption(label);
    panel.setContent(child);
    addComponent(panel);
}

18 View Complete Implementation : DocumentAttachementsPageModContentFactoryImpl.java
Copyright Apache License 2.0
Author : Hack23
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();
    final String pageId = getPageId(parameters);
    getDoreplacedentMenuItemFactory().createDoreplacedentMenuBar(menuBar, pageId);
    final DataContainer<DoreplacedentStatusContainer, String> doreplacedentStatusContainerDataContainer = getApplicationManager().getDataContainer(DoreplacedentStatusContainer.clreplaced);
    final DoreplacedentStatusContainer doreplacedentStatusContainer = doreplacedentStatusContainerDataContainer.findByQueryProperty(DoreplacedentStatusContainer.clreplaced, DoreplacedentStatusContainer_.doreplacedent, DoreplacedentData.clreplaced, DoreplacedentData_.id, pageId);
    LabelFactory.createHeader2Label(panelContent, DOreplacedENT_ATTACHMENTS);
    if (doreplacedentStatusContainer != null && doreplacedentStatusContainer.getDoreplacedentAttachmentContainer() != null && doreplacedentStatusContainer.getDoreplacedentAttachmentContainer().getDoreplacedentAttachmentList() != null) {
        getGridFactory().createBasicBeanItemGrid(panelContent, DoreplacedentAttachment.clreplaced, doreplacedentStatusContainer.getDoreplacedentAttachmentContainer().getDoreplacedentAttachmentList(), DOreplacedENT_ATTACHMENTS, COLUMN_ORDER, HIDE_COLUMNS, null, null, null);
        displayDoreplacedentAttachements(panelContent, doreplacedentStatusContainer.getDoreplacedentAttachmentContainer().getDoreplacedentAttachmentList());
    }
    panel.setContent(panelContent);
    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_DOreplacedENT_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId);
    return panelContent;
}

18 View Complete Implementation : DocumentDataPageModContentFactoryImpl.java
Copyright Apache License 2.0
Author : Hack23
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();
    final String pageId = getPageId(parameters);
    getDoreplacedentMenuItemFactory().createDoreplacedentMenuBar(menuBar, pageId);
    LabelFactory.createHeader2Label(panelContent, DOreplacedENT_DATA);
    final DataContainer<DoreplacedentContentData, String> doreplacedentContentDataDataContainer = getApplicationManager().getDataContainer(DoreplacedentContentData.clreplaced);
    final List<DoreplacedentContentData> doreplacedentContentlist = doreplacedentContentDataDataContainer.getAllBy(DoreplacedentContentData_.id, pageId);
    if (!doreplacedentContentlist.isEmpty()) {
        final Panel formPanel = new Panel();
        formPanel.setSizeFull();
        panelContent.addComponent(formPanel);
        final FormLayout formContent = new FormLayout();
        formPanel.setContent(formContent);
        final String cleanContent = Jsoup.clean(doreplacedentContentlist.get(0).getContent(), "", Whitelist.simpleText(), new OutputSettings().indentAmount(4));
        final Label htmlContent = new Label(cleanContent, ContentMode.PREFORMATTED);
        formContent.addComponent(htmlContent);
        final DoreplacedentWordCountRequest doreplacedentWordCountRequest = new DoreplacedentWordCountRequest();
        doreplacedentWordCountRequest.setDoreplacedentId(pageId);
        doreplacedentWordCountRequest.setMaxResults(MAX_RESULTS);
        doreplacedentWordCountRequest.setSessionId(RequestContextHolder.currentRequestAttributes().getSessionId());
        final DoreplacedentWordCountResponse resp = (DoreplacedentWordCountResponse) getApplicationManager().service(doreplacedentWordCountRequest);
        if (resp.getWordCountMap() != null) {
            final Label wordCloud = new Label(createWordCloud(resp.getWordCountMap()), ContentMode.HTML);
            formContent.addComponent(wordCloud);
        }
        panelContent.setExpandRatio(formPanel, ContentRatio.GRID);
    }
    panel.setContent(panelContent);
    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_DOreplacedENT_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId);
    return panelContent;
}

18 View Complete Implementation : CmsBasicDialog.java
Copyright GNU Lesser General Public License v2.1
Author : alkacon
/**
 * Creates a resource list panel.<p>
 *
 * @param caption the caption to use
 * @param resourceInfo the resource-infos
 * @return the panel
 */
protected Panel createResourceListPanelDirectly(String caption, List<CmsResourceInfo> resourceInfo) {
    Panel result = new Panel(caption);
    result.addStyleName("v-scrollable");
    result.setSizeFull();
    VerticalLayout resourcePanel = new VerticalLayout();
    result.setContent(resourcePanel);
    resourcePanel.addStyleName(OpenCmsTheme.REDUCED_MARGIN);
    resourcePanel.addStyleName(OpenCmsTheme.REDUCED_SPACING);
    resourcePanel.setSpacing(true);
    resourcePanel.setMargin(true);
    for (CmsResourceInfo resource : resourceInfo) {
        resourcePanel.addComponent(resource);
    }
    return result;
}

18 View Complete Implementation : DocumentDecisionPageModContentFactoryImpl.java
Copyright Apache License 2.0
Author : Hack23
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();
    final String pageId = getPageId(parameters);
    getDoreplacedentMenuItemFactory().createDoreplacedentMenuBar(menuBar, pageId);
    final DataContainer<DoreplacedentStatusContainer, String> doreplacedentStatusContainerDataContainer = getApplicationManager().getDataContainer(DoreplacedentStatusContainer.clreplaced);
    final DoreplacedentStatusContainer doreplacedentStatusContainer = doreplacedentStatusContainerDataContainer.findByQueryProperty(DoreplacedentStatusContainer.clreplaced, DoreplacedentStatusContainer_.doreplacedent, DoreplacedentData.clreplaced, DoreplacedentData_.id, pageId);
    LabelFactory.createHeader2Label(panelContent, DOreplacedENT_DECISION);
    if (doreplacedentStatusContainer != null && doreplacedentStatusContainer.getDoreplacedentProposal() != null && doreplacedentStatusContainer.getDoreplacedentProposal().getProposal() != null) {
        getFormFactory().addFormPanelTextFields(panelContent, doreplacedentStatusContainer.getDoreplacedentProposal().getProposal(), DoreplacedentProposalData.clreplaced, AS_LIST);
    }
    panel.setContent(panelContent);
    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_DOreplacedENT_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId);
    return panelContent;
}

17 View Complete Implementation : CmsBasicDialog.java
Copyright GNU Lesser General Public License v2.1
Author : alkacon
/**
 * Creates a resource list panel.<p>
 *
 * @param caption the caption to use
 * @param resources the resources
 *
 * @return the panel
 */
protected Panel createResourceListPanel(String caption, List<CmsResource> resources) {
    Panel result = null;
    if (CmsStringUtil.isEmptyOrWhitespaceOnly(caption)) {
        result = new Panel();
    } else {
        result = new Panel(caption);
    }
    result.addStyleName("v-scrollable");
    result.setSizeFull();
    VerticalLayout resourcePanel = new VerticalLayout();
    result.setContent(resourcePanel);
    resourcePanel.addStyleName(OpenCmsTheme.REDUCED_MARGIN);
    resourcePanel.addStyleName(OpenCmsTheme.REDUCED_SPACING);
    resourcePanel.setSpacing(true);
    resourcePanel.setMargin(true);
    for (CmsResource resource : resources) {
        resourcePanel.addComponent(new CmsResourceInfo(resource));
    }
    return result;
}

17 View Complete Implementation : CmsUpdateStep02DBDialog.java
Copyright GNU Lesser General Public License v2.1
Author : alkacon
/**
 * Get panel for given db pool.<p>
 *
 * @param dbBean to get info from
 * @param pool to show panel for
 * @return Panel
 */
private Panel getDBPoolPanel(CmsUpdateDBManager dbBean, String pool) {
    Panel res = new Panel();
    res.setCaption(pool);
    VerticalLayout layout = new VerticalLayout();
    layout.setMargin(true);
    String widthString = "300px";
    layout.addComponent(getTableLikeLabel("JDBC Driver", dbBean.getDbDriver(pool), widthString));
    layout.addComponent(getTableLikeLabel("JDBC Connection Url", dbBean.getDbUrl(pool), widthString));
    layout.addComponent(getTableLikeLabel("JDBC Connection Url Params", dbBean.getDbParams(pool), widthString));
    layout.addComponent(getTableLikeLabel("Database User", dbBean.getDbUser(pool), widthString));
    res.setContent(layout);
    return res;
}

17 View Complete Implementation : AbstractTableLayout.java
Copyright Eclipse Public License 1.0
Author : eclipse
private void buildLayout() {
    setSizeFull();
    setSpacing(true);
    setMargin(false);
    setStyleName("group");
    final VerticalLayout tableHeaderLayout = new VerticalLayout();
    tableHeaderLayout.setSizeFull();
    tableHeaderLayout.setSpacing(false);
    tableHeaderLayout.setMargin(false);
    tableHeaderLayout.setStyleName("table-layout");
    tableHeaderLayout.addComponent(tableHeader);
    tableHeaderLayout.setComponentAlignment(tableHeader, Alignment.TOP_CENTER);
    if (isShortCutKeysRequired()) {
        final Panel tablePanel = new Panel();
        tablePanel.setStyleName("table-panel");
        tablePanel.setHeight(100.0F, Unit.PERCENTAGE);
        tablePanel.setContent(table);
        tablePanel.addActionHandler(getShortCutKeysHandler(i18n));
        tablePanel.addStyleName(ValoTheme.PANEL_BORDERLESS);
        tableHeaderLayout.addComponent(tablePanel);
        tableHeaderLayout.setComponentAlignment(tablePanel, Alignment.TOP_CENTER);
        tableHeaderLayout.setExpandRatio(tablePanel, 1.0F);
    } else {
        tableHeaderLayout.addComponent(table);
        tableHeaderLayout.setComponentAlignment(table, Alignment.TOP_CENTER);
        tableHeaderLayout.setExpandRatio(table, 1.0F);
    }
    addComponent(tableHeaderLayout);
    addComponent(detailsLayout);
    setComponentAlignment(tableHeaderLayout, Alignment.TOP_CENTER);
    setComponentAlignment(detailsLayout, Alignment.TOP_CENTER);
    setExpandRatio(tableHeaderLayout, 1.0F);
}

17 View Complete Implementation : DocumentPageVisitHistoryPageModContentFactoryImpl.java
Copyright Apache License 2.0
Author : Hack23
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();
    final String pageId = getPageId(parameters);
    getDoreplacedentMenuItemFactory().createDoreplacedentMenuBar(menuBar, pageId);
    createPageVisitHistory(NAME, pageId, panelContent);
    panel.setContent(panelContent);
    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_DOreplacedENT_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId);
    return panelContent;
}

17 View Complete Implementation : SearchDocumentPageModContentFactoryImpl.java
Copyright Apache License 2.0
Author : Hack23
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();
    final String pageId = getPageId(parameters);
    doreplacedentMenuItemFactory.createDoreplacedentsMenuBar(menuBar);
    final VerticalLayout searchLayout = new VerticalLayout();
    searchLayout.setSizeFull();
    panelContent.addComponent(searchLayout);
    final VerticalLayout searchresultLayout = new VerticalLayout();
    searchresultLayout.setSizeFull();
    final Panel formPanel = new Panel();
    formPanel.setSizeFull();
    searchresultLayout.addComponent(formPanel);
    final FormLayout formContent = new FormLayout();
    formPanel.setContent(formContent);
    panelContent.addComponent(searchresultLayout);
    panelContent.setExpandRatio(searchresultLayout, ContentRatio.LARGE);
    final SearchDoreplacedentRequest searchRequest = new SearchDoreplacedentRequest();
    searchRequest.setSessionId(RequestContextHolder.currentRequestAttributes().getSessionId());
    searchRequest.setMaxResults(MAX_RESULT_SIZE);
    searchRequest.setSearchExpression("");
    getFormFactory().addRequestInputFormFields(formContent, searchRequest, SearchDoreplacedentRequest.clreplaced, AS_LIST, SEARCH, new SearchDoreplacedentClickListener(searchRequest, new SearchDoreplacedentResponseHandlerImpl(getGridFactory(), formPanel, searchresultLayout)));
    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_DOreplacedENT_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId);
    return panelContent;
}

17 View Complete Implementation : UserHomeSecuritySettingsPageModContentFactoryImpl.java
Copyright Apache License 2.0
Author : Hack23
/**
 * Creates the enable google auth button.
 *
 * @return the vertical layout
 */
private VerticalLayout createEnableGoogleAuthButton() {
    final VerticalLayout formLayout = new VerticalLayout();
    formLayout.setSizeFull();
    final Panel formPanel = new Panel();
    formPanel.setSizeFull();
    formLayout.addComponent(formPanel);
    final FormLayout formContent = new FormLayout();
    formPanel.setContent(formContent);
    final SetGoogleAuthenticatorCredentialRequest request = new SetGoogleAuthenticatorCredentialRequest();
    request.setSessionId(RequestContextHolder.currentRequestAttributes().getSessionId());
    request.setUserpreplacedword("");
    final ClickListener listener = new SetGoogleAuthenticatorCredentialClickListener(request);
    getFormFactory().addRequestInputFormFields(formContent, request, SetGoogleAuthenticatorCredentialRequest.clreplaced, AS_LIST, ENABLE_GOOGLE_AUTHENTICATOR, listener);
    return formLayout;
}