Example usage for com.vaadin.ui Panel setSizeFull

List of usage examples for com.vaadin.ui Panel setSizeFull

Introduction

In this page you can find the example usage for com.vaadin.ui Panel setSizeFull.

Prototype

@Override
    public void setSizeFull() 

Source Link

Usage

From source file:nl.kpmg.lcm.ui.Application.java

License:Apache License

@Override
protected void init(VaadinRequest vaadinRequest) {
    getPage().setTitle("Local Catalog Manager");

    final VerticalLayout root = new VerticalLayout();
    root.setSizeFull();/*from w  ww .ja  v a2  s  .c  o m*/
    root.setMargin(true);
    root.setSpacing(true);
    setContent(root);

    final CssLayout navigationBar = new CssLayout();
    navigationBar.addStyleName(ValoTheme.LAYOUT_COMPONENT_GROUP);

    Label logo = new Label("LCM");
    logo.addStyleName("logo");
    logo.setWidthUndefined();

    navigationBar.addComponent(logo);
    navigationBar.addComponent(createNavigationButton("Metadata", MetadataOverviewViewImpl.VIEW_NAME));
    navigationBar.addComponent(createNotImplementedButton("Analytics"));
    navigationBar.addComponent(createNavigationButton("Transfer", TransferViewImpl.VIEW_NAME));
    navigationBar.addComponent(createNavigationButton("Administration", AdministrationViewImpl.VIEW_NAME));
    navigationBar.addComponent(createLogoutButton("Logout"));
    root.addComponent(navigationBar);

    final Panel viewContainer = new Panel();
    viewContainer.setSizeFull();
    root.addComponent(viewContainer);
    root.setExpandRatio(viewContainer, 1.0f);

    navigator = new Navigator(this, viewContainer);
    navigator.addProvider(viewProvider);
    navigator.navigateTo("login");
}

From source file:org.activiti.explorer.ui.management.job.JobDetailPanel.java

License:Apache License

protected void addJobState() {
    Label processDefinitionHeader = new Label(i18nManager.getMessage(Messages.JOB_HEADER_EXECUTION));
    processDefinitionHeader.addStyleName(ExplorerLayout.STYLE_H3);
    processDefinitionHeader.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK);
    processDefinitionHeader.setWidth(100, UNITS_PERCENTAGE);
    addComponent(processDefinitionHeader);

    VerticalLayout layout = new VerticalLayout();
    layout.setSpacing(true);//from w w  w.j  av  a 2s  .  c o  m
    layout.setSizeFull();
    layout.setMargin(true, false, true, false);

    addDetailComponent(layout);
    setDetailExpandRatio(layout, 1.0f);

    // Exceptions
    if (job.getExceptionMessage() != null) {
        // Number of retries
        Label retrieslabel = new Label(getRetriesLabel(job));
        layout.addComponent(retrieslabel);

        // Exception
        Label exceptionMessageLabel = new Label(
                i18nManager.getMessage(Messages.JOB_ERROR) + ": " + job.getExceptionMessage());
        exceptionMessageLabel.addStyleName(ExplorerLayout.STYLE_JOB_EXCEPTION_MESSAGE);
        layout.addComponent(exceptionMessageLabel);

        // Add Exception stacktrace
        String stack = managementService.getJobExceptionStacktrace(job.getId());

        Label stackTraceLabel = new Label(stack);
        stackTraceLabel.setContentMode(Label.CONTENT_PREFORMATTED);
        stackTraceLabel.addStyleName(ExplorerLayout.STYLE_JOB_EXCEPTION_TRACE);
        stackTraceLabel.setSizeFull();

        Panel stackPanel = new Panel();
        stackPanel.setWidth(100, UNITS_PERCENTAGE);
        stackPanel.setSizeFull();
        stackPanel.setScrollable(true);
        stackPanel.addComponent(stackTraceLabel);

        layout.addComponent(stackPanel);
        layout.setExpandRatio(stackPanel, 1.0f);
    } else {

        if (job.getProcessDefinitionId() != null) {

            // This is a hack .. need to cleanify this in the engine
            JobEntity jobEntity = (JobEntity) job;
            if (jobEntity.getJobHandlerType().equals(TimerSuspendProcessDefinitionHandler.TYPE)) {
                addLinkToProcessDefinition(layout,
                        i18nManager.getMessage(Messages.JOB_SUSPEND_PROCESSDEFINITION), false);
            } else if (jobEntity.getJobHandlerType().equals(TimerActivateProcessDefinitionHandler.TYPE)) {
                addLinkToProcessDefinition(layout,
                        i18nManager.getMessage(Messages.JOB_ACTIVATE_PROCESSDEFINITION), true);
            } else {
                addNotYetExecutedLabel(layout);
            }

        } else {

            addNotYetExecutedLabel(layout);

        }
    }
}

From source file:org.activiti.explorer.ui.profile.ProfilePanel.java

License:Apache License

protected void initInformationPanel() {
    Panel infoPanel = new Panel();
    infoPanel.addStyleName(Reindeer.PANEL_LIGHT);
    infoPanel.setSizeFull();

    profilePanelLayout.addComponent(infoPanel);
    profilePanelLayout.setExpandRatio(infoPanel, 1.0f); // info panel should take all the remaining width available

    // All the information sections are put under each other in a vertical layout
    this.infoPanelLayout = new VerticalLayout();
    infoPanel.setContent(infoPanelLayout);

    initAboutSection();/*from   w w  w  .j  a v a 2 s.c  o m*/
    initContactSection();

}

From source file:org.activiti.kickstart.KickStartApplication.java

License:Apache License

protected void initMainWindow() {

    Window mainWindow = new Window(TITLE);
    setMainWindow(mainWindow);//from   www  . java 2  s.co m
    Panel p = new Panel();
    p.setSizeFull();
    mainWindow.setContent(p);

    mainLayout = new CustomLayout(THEME_NAME); // uses layout defined in webapp/Vaadin/themes/yakalo
    mainLayout.setSizeFull();
    p.setContent(mainLayout);

    initSplitPanel();
    initViewManager();
    initActionsPanel();
}

From source file:org.bubblecloud.ilves.component.flow.BlankFlowlet.java

License:Apache License

@Override
protected void initialize() {
    this.setSizeFull();
    final Panel panel = new Panel();
    panel.setSizeFull();
    setCompositionRoot(panel);//from w  w  w .  j  a  v a2s. c o m
}

From source file:org.casbah.ui.MainCAView.java

License:Open Source License

public void init() throws CAProviderException {

    final X509Certificate caCert = provider.getCACertificate();
    Panel panel = new Panel("CA Details");
    VerticalLayout mainLayout = new VerticalLayout();
    panel.setContent(mainLayout);//ww w  .  j a v  a2  s.  com
    mainLayout.setSizeFull();
    VerticalLayout caInfo = new VerticalLayout();
    TextField name = new TextField("Distinguished Name");
    String nameValue = caCert.getSubjectX500Principal().getName();
    name.setValue(nameValue);
    name.setColumns(50);
    name.setReadOnly(true);

    TextField issuer = new TextField("Issuer");
    issuer.setColumns(50);
    issuer.setValue(caCert.getIssuerX500Principal().getName());
    issuer.setReadOnly(true);

    DateField expDate = new DateField("Expiration Date");
    expDate.setResolution(DateField.RESOLUTION_SEC);
    expDate.setValue(caCert.getNotAfter());
    expDate.setReadOnly(true);

    TextField serial = new TextField("Serial");
    serial.setValue(caCert.getSerialNumber().toString(16));
    serial.setReadOnly(true);

    caInfo.addComponent(name);
    caInfo.addComponent(issuer);
    caInfo.addComponent(expDate);
    caInfo.addComponent(serial);
    caInfo.setSizeFull();

    HorizontalLayout caButtons = new HorizontalLayout();
    caButtons.addComponent(new Button("View Certificate", new Button.ClickListener() {

        private static final long serialVersionUID = 1L;

        public void buttonClick(ClickEvent event) {
            try {
                showEncodedCertificate(caCert, caCert.getSerialNumber().toString(16));
            } catch (CAProviderException e) {
                e.printStackTrace();
            }

        }
    }));
    caButtons.addComponent(new Button("Download Certificate", new Button.ClickListener() {

        private static final long serialVersionUID = 1L;

        public void buttonClick(ClickEvent event) {
            try {
                downloadEncodedCertificate(caCert, caCert.getSerialNumber().toString(16));
            } catch (CAProviderException e) {
                e.printStackTrace();
            }
        }
    }));

    caButtons.addComponent(new Button("Sign a CSR", new Button.ClickListener() {

        private static final long serialVersionUID = 1L;

        public void buttonClick(ClickEvent event) {
            try {
                uploadAndSignCsr();
            } catch (CAProviderException pe) {
                pe.printStackTrace();
            }

        }

    }));

    caButtons.addComponent(new Button("Get CRL", new Button.ClickListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(ClickEvent event) {
            try {
                downloadCrlList(provider.getLatestCrl(false));
            } catch (CAProviderException pe) {
                logger.log(Level.SEVERE, "Could not retrieve CRL", pe);
                getWindow().showNotification("An error occurred while retrieving the CRL",
                        Notification.TYPE_ERROR_MESSAGE);
            }

        }

    }));

    panel.addComponent(caInfo);
    panel.addComponent(caButtons);
    panel.setSizeFull();
    setSizeFull();
    setCompositionRoot(panel);

}

From source file:org.eclipse.hawkbit.simulator.ui.SimulatorUI.java

License:Open Source License

@Override
protected void init(final VaadinRequest request) {

    rootLayout.setSizeFull();//  w  w  w. j a  va  2s  . co m

    final Panel viewContainer = new Panel();
    viewContainer.setSizeFull();
    rootLayout.addComponent(viewContainer);
    rootLayout.setExpandRatio(viewContainer, 1.0F);

    final Navigator navigator = new Navigator(this, viewContainer);
    navigator.addProvider(viewProvider);

    setContent(rootLayout);
}

From source file:org.eclipse.hawkbit.ui.AbstractHawkbitUI.java

License:Open Source License

private Panel buildContent() {
    final Panel content = new Panel();
    content.setSizeFull();
    content.setStyleName("view-content");
    return content;
}

From source file:org.eclipse.hawkbit.ui.tenantconfiguration.AuthenticationConfigurationView.java

License:Open Source License

private void init() {

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

    rootPanel.addStyleName("config-panel");

    final VerticalLayout vLayout = new VerticalLayout();
    vLayout.setMargin(true);/*from  w  ww  .  j  a  v  a 2  s  .  c  o  m*/
    vLayout.setSizeFull();

    final Label header = new Label(i18n.getMessage("configuration.authentication.title"));
    header.addStyleName("config-panel-header");
    vLayout.addComponent(header);

    final GridLayout gridLayout = new GridLayout(3, 4);
    gridLayout.setSpacing(true);
    gridLayout.setImmediate(true);
    gridLayout.setSizeFull();
    gridLayout.setColumnExpandRatio(1, 1.0F);

    certificateAuthCheckbox = SPUIComponentProvider.getCheckBox("", DIST_CHECKBOX_STYLE, null, false, "");
    certificateAuthCheckbox.setValue(certificateAuthenticationConfigurationItem.isConfigEnabled());
    certificateAuthCheckbox.addValueChangeListener(this);
    certificateAuthenticationConfigurationItem.addChangeListener(this);
    gridLayout.addComponent(certificateAuthCheckbox, 0, 0);
    gridLayout.addComponent(certificateAuthenticationConfigurationItem, 1, 0);

    targetSecTokenCheckBox = SPUIComponentProvider.getCheckBox("", DIST_CHECKBOX_STYLE, null, false, "");
    targetSecTokenCheckBox.setValue(targetSecurityTokenAuthenticationConfigurationItem.isConfigEnabled());
    targetSecTokenCheckBox.addValueChangeListener(this);
    targetSecurityTokenAuthenticationConfigurationItem.addChangeListener(this);
    gridLayout.addComponent(targetSecTokenCheckBox, 0, 1);
    gridLayout.addComponent(targetSecurityTokenAuthenticationConfigurationItem, 1, 1);

    gatewaySecTokenCheckBox = SPUIComponentProvider.getCheckBox("", DIST_CHECKBOX_STYLE, null, false, "");
    gatewaySecTokenCheckBox.setId("gatewaysecuritycheckbox");
    gatewaySecTokenCheckBox.setValue(gatewaySecurityTokenAuthenticationConfigurationItem.isConfigEnabled());
    gatewaySecTokenCheckBox.addValueChangeListener(this);
    gatewaySecurityTokenAuthenticationConfigurationItem.addChangeListener(this);
    gridLayout.addComponent(gatewaySecTokenCheckBox, 0, 2);
    gridLayout.addComponent(gatewaySecurityTokenAuthenticationConfigurationItem, 1, 2);

    downloadAnonymousCheckBox = SPUIComponentProvider.getCheckBox("", DIST_CHECKBOX_STYLE, null, false, "");
    downloadAnonymousCheckBox.setId(UIComponentIdProvider.DOWNLOAD_ANONYMOUS_CHECKBOX);
    downloadAnonymousCheckBox.setValue(anonymousDownloadAuthenticationConfigurationItem.isConfigEnabled());
    downloadAnonymousCheckBox.addValueChangeListener(this);
    anonymousDownloadAuthenticationConfigurationItem.addChangeListener(this);
    gridLayout.addComponent(downloadAnonymousCheckBox, 0, 3);
    gridLayout.addComponent(anonymousDownloadAuthenticationConfigurationItem, 1, 3);

    final Link linkToSecurityHelp = SPUIComponentProvider.getHelpLink(i18n,
            uiProperties.getLinks().getDocumentation().getSecurity());
    gridLayout.addComponent(linkToSecurityHelp, 2, 3);
    gridLayout.setComponentAlignment(linkToSecurityHelp, Alignment.BOTTOM_RIGHT);

    vLayout.addComponent(gridLayout);
    rootPanel.setContent(vLayout);
    setCompositionRoot(rootPanel);
}

From source file:org.eclipse.hawkbit.ui.tenantconfiguration.DefaultDistributionSetTypeLayout.java

License:Open Source License

DefaultDistributionSetTypeLayout(final SystemManagement systemManagement,
        final DistributionSetTypeManagement distributionSetTypeManagement, final VaadinMessageSource i18n,
        final SpPermissionChecker permChecker) {
    this.systemManagement = systemManagement;
    combobox = SPUIComponentProvider.getComboBox(null, "330", null, null, false, "", "label.combobox.tag");
    changeIcon = new Label();

    if (!permChecker.hasReadRepositoryPermission()) {
        return;//from   w w w . ja  v a2  s .c  om
    }

    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.defaultdistributionset.title"));
    header.addStyleName("config-panel-header");
    vlayout.addComponent(header);

    final DistributionSetType currentDistributionSetType = getCurrentDistributionSetType();
    currentDefaultDisSetType = currentDistributionSetType.getId();

    final HorizontalLayout hlayout = new HorizontalLayout();
    hlayout.setSpacing(true);
    hlayout.setImmediate(true);

    final Label configurationLabel = new LabelBuilder()
            .name(i18n.getMessage("configuration.defaultdistributionset.select.label")).buildLabel();
    hlayout.addComponent(configurationLabel);

    final Iterable<DistributionSetType> distributionSetTypeCollection = distributionSetTypeManagement
            .findAll(PageRequest.of(0, 100));

    combobox.setId(UIComponentIdProvider.SYSTEM_CONFIGURATION_DEFAULTDIS_COMBOBOX);
    combobox.setNullSelectionAllowed(false);
    for (final DistributionSetType distributionSetType : distributionSetTypeCollection) {
        combobox.addItem(distributionSetType.getId());
        combobox.setItemCaption(distributionSetType.getId(),
                distributionSetType.getKey() + " (" + distributionSetType.getName() + ")");

        if (distributionSetType.getId().equals(currentDistributionSetType.getId())) {
            combobox.select(distributionSetType.getId());
        }
    }
    combobox.setImmediate(true);
    combobox.addValueChangeListener(event -> selectDistributionSetValue());
    hlayout.addComponent(combobox);

    changeIcon.setIcon(FontAwesome.CHECK);
    hlayout.addComponent(changeIcon);
    changeIcon.setVisible(false);

    vlayout.addComponent(hlayout);
    rootPanel.setContent(vlayout);
    setCompositionRoot(rootPanel);
}