Java Code Examples for com.vaadin.ui.GridLayout#setSizeFull()

The following examples show how to use com.vaadin.ui.GridLayout#setSizeFull() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UploadArtifactView.java    From hawkbit with Eclipse Public License 1.0 6 votes vote down vote up
private GridLayout createMainLayout() {
    createDetailsAndUploadLayout();
    mainLayout = new GridLayout(3, 1);
    mainLayout.setSizeFull();
    mainLayout.setSpacing(true);
    mainLayout.setStyleName("fullSize");
    mainLayout.addComponent(filterByTypeLayout, 0, 0);
    mainLayout.addComponent(smTableLayout, 1, 0);
    mainLayout.addComponent(detailAndUploadLayout, 2, 0);

    mainLayout.setRowExpandRatio(0, 1.0F);
    mainLayout.setColumnExpandRatio(1, 0.5F);
    mainLayout.setColumnExpandRatio(2, 0.5F);

    return mainLayout;
}
 
Example 2
Source File: RolloutConfigurationView.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
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.title"));
        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().getDocumentation().getRollout());
        gridLayout.addComponent(linkToApprovalHelp, 2, 0);
        gridLayout.setComponentAlignment(linkToApprovalHelp, Alignment.BOTTOM_RIGHT);

        vLayout.addComponent(gridLayout);
        rootPanel.setContent(vLayout);
        setCompositionRoot(rootPanel);
    }
 
Example 3
Source File: AbstractTagLayout.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
protected void buildLayout() {
    mainLayout = new GridLayout(3, 2);
    mainLayout.setSpacing(true);
    colorPickerLayout = new ColorPickerLayout();
    ColorPickerHelper.setRgbSliderValues(colorPickerLayout);
    contentLayout = new VerticalLayout();

    colorLabelLayout = new HorizontalLayout();
    colorLabelLayout.setMargin(false);
    colorLabelLayout.addComponents(colorLabel, tagColorPreviewBtn);

    formLayout.addComponent(tagName);
    formLayout.addComponent(tagDesc);
    formLayout.setSizeFull();

    contentLayout.addComponent(formLayout);
    contentLayout.addComponent(colorLabelLayout);
    contentLayout.setComponentAlignment(formLayout, Alignment.MIDDLE_CENTER);
    contentLayout.setComponentAlignment(colorLabelLayout, Alignment.MIDDLE_LEFT);
    contentLayout.setSizeUndefined();

    mainLayout.setSizeFull();
    mainLayout.addComponent(contentLayout, 0, 0);

    colorPickerLayout.setVisible(false);
    mainLayout.addComponent(colorPickerLayout, 1, 0);
    mainLayout.setComponentAlignment(colorPickerLayout, Alignment.MIDDLE_CENTER);

    setCompositionRoot(mainLayout);
    tagName.focus();
}
 
Example 4
Source File: DeploymentView.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
private void createMainLayout() {
    mainLayout = new GridLayout();
    layoutWidgets();
    mainLayout.setSizeFull();
    mainLayout.setSpacing(true);
    mainLayout.setRowExpandRatio(0, 1F);
    mainLayout.setStyleName("fullSize");
}
 
Example 5
Source File: DistributionsView.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
private void createMainLayout() {
    mainLayout = new GridLayout(4, 1);
    mainLayout.setSizeFull();
    mainLayout.setSpacing(true);
    mainLayout.setStyleName("fullSize");

    mainLayout.addComponent(filterByDSTypeLayout, 0, 0);
    mainLayout.addComponent(distributionTableLayout, 1, 0);
    mainLayout.addComponent(softwareModuleTableLayout, 2, 0);
    mainLayout.addComponent(filterBySMTypeLayout, 3, 0);
    mainLayout.setRowExpandRatio(0, 1.0F);
    mainLayout.setColumnExpandRatio(1, 0.5F);
    mainLayout.setColumnExpandRatio(2, 0.5F);
}
 
Example 6
Source File: AuthenticationConfigurationView.java    From hawkbit with Eclipse Public License 1.0 4 votes vote down vote up
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.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);
    }
 
Example 7
Source File: RepositoryConfigurationView.java    From hawkbit with Eclipse Public License 1.0 4 votes vote down vote up
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.repository.title"));
        header.addStyleName("config-panel-header");
        vLayout.addComponent(header);

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

        final boolean isMultiAssignmentsEnabled = multiAssignmentsConfigurationItem.isConfigEnabled();

        actionAutocloseCheckBox = SPUIComponentProvider.getCheckBox("", DIST_CHECKBOX_STYLE, null, false, "");
        actionAutocloseCheckBox.setId(UIComponentIdProvider.REPOSITORY_ACTIONS_AUTOCLOSE_CHECKBOX);
        actionAutocloseCheckBox.setEnabled(!isMultiAssignmentsEnabled);
        actionAutocloseConfigurationItem.setEnabled(!isMultiAssignmentsEnabled);
        actionAutocloseCheckBox.setValue(actionAutocloseConfigurationItem.isConfigEnabled());
        actionAutocloseCheckBox.addValueChangeListener(this);
        actionAutocloseConfigurationItem.addChangeListener(this);
        gridLayout.addComponent(actionAutocloseCheckBox, 0, 0);
        gridLayout.addComponent(actionAutocloseConfigurationItem, 1, 0);

        multiAssignmentsCheckBox = SPUIComponentProvider.getCheckBox("", DIST_CHECKBOX_STYLE, null, false, "");
        multiAssignmentsCheckBox.setId(UIComponentIdProvider.REPOSITORY_MULTI_ASSIGNMENTS_CHECKBOX);
        multiAssignmentsCheckBox.setValue(multiAssignmentsConfigurationItem.isConfigEnabled());
        multiAssignmentsCheckBox.addValueChangeListener(this);
        multiAssignmentsCheckBox.setEnabled(!isMultiAssignmentsEnabled);
        multiAssignmentsConfigurationItem.setEnabled(!isMultiAssignmentsEnabled);
        multiAssignmentsConfigurationItem.addChangeListener(this);
        gridLayout.addComponent(multiAssignmentsCheckBox, 0, 1);
        gridLayout.addComponent(multiAssignmentsConfigurationItem, 1, 1);

        actionAutocleanupCheckBox = SPUIComponentProvider.getCheckBox("", DIST_CHECKBOX_STYLE, null, false, "");
        actionAutocleanupCheckBox.setId(UIComponentIdProvider.REPOSITORY_ACTIONS_AUTOCLEANUP_CHECKBOX);
        actionAutocleanupCheckBox.setValue(actionAutocleanupConfigurationItem.isConfigEnabled());
        actionAutocleanupCheckBox.addValueChangeListener(this);
        actionAutocleanupConfigurationItem.addChangeListener(this);
        gridLayout.addComponent(actionAutocleanupCheckBox, 0, 2);
        gridLayout.addComponent(actionAutocleanupConfigurationItem, 1, 2);

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

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