Java Code Examples for com.vaadin.ui.HorizontalLayout#addStyleName()

The following examples show how to use com.vaadin.ui.HorizontalLayout#addStyleName() . 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: ArtifactDetailsLayout.java    From hawkbit with Eclipse Public License 1.0 6 votes vote down vote up
private void buildLayout() {
    final HorizontalLayout header = new HorizontalLayout();
    header.addStyleName("artifact-details-header");
    header.addStyleName("bordered-layout");
    header.addStyleName("no-border-bottom");
    header.setSpacing(false);
    header.setMargin(false);
    header.setSizeFull();
    header.setHeightUndefined();
    header.setImmediate(true);
    header.addComponents(headerCaptionLayout, maxMinButton);
    header.setComponentAlignment(headerCaptionLayout, Alignment.TOP_LEFT);
    header.setComponentAlignment(maxMinButton, Alignment.TOP_RIGHT);
    header.setExpandRatio(headerCaptionLayout, 1.0F);

    setSizeFull();
    setImmediate(true);
    addStyleName("artifact-table");
    addStyleName("table-layout");
    addComponent(header);
    setComponentAlignment(header, Alignment.MIDDLE_CENTER);
    addComponent(artifactDetailsTable);
    setComponentAlignment(artifactDetailsTable, Alignment.MIDDLE_CENTER);
    setExpandRatio(artifactDetailsTable, 1.0F);
}
 
Example 2
Source File: TargetBulkUpdateWindowLayout.java    From hawkbit with Eclipse Public License 1.0 6 votes vote down vote up
private void buildLayout() {
    mainLayout = new VerticalLayout();
    mainLayout.setSpacing(Boolean.TRUE);
    mainLayout.setSizeUndefined();
    mainLayout.setWidth("200px");

    final HorizontalLayout captionLayout = new HorizontalLayout();
    captionLayout.setSizeFull();
    captionLayout.addComponents(windowCaption, minimizeButton, closeButton);
    captionLayout.setExpandRatio(windowCaption, 1.0F);
    captionLayout.addStyleName("v-window-header");

    final HorizontalLayout uploaderLayout = new HorizontalLayout();
    uploaderLayout.addComponent(bulkUploader);
    uploaderLayout.addComponent(linkToSystemConfigHelp);
    uploaderLayout.setComponentAlignment(linkToSystemConfigHelp, Alignment.BOTTOM_RIGHT);
    uploaderLayout.setExpandRatio(bulkUploader, 1.0F);
    uploaderLayout.setSizeFull();
    mainLayout.addComponents(captionLayout, dsNamecomboBox, descTextArea, tokenVerticalLayout, descTextArea,
            progressBar, targetsCountLabel, uploaderLayout);
}
 
Example 3
Source File: AbstractFilterHeader.java    From hawkbit with Eclipse Public License 1.0 6 votes vote down vote up
private void buildLayout() {
    setStyleName("filter-btns-header-layout");
    typeHeaderLayout = new HorizontalLayout();
    typeHeaderLayout.setHeight(32, Unit.PIXELS);
    typeHeaderLayout.setWidth(100.0F, Unit.PERCENTAGE);
    typeHeaderLayout.addComponentAsFirst(title);
    typeHeaderLayout.addStyleName(SPUIStyleDefinitions.WIDGET_TITLE);
    typeHeaderLayout.setComponentAlignment(title, Alignment.TOP_LEFT);
    if (menu != null) {
        typeHeaderLayout.addComponent(menu);
        typeHeaderLayout.setComponentAlignment(menu, Alignment.TOP_RIGHT);
    }
    typeHeaderLayout.addComponent(hideIcon);
    typeHeaderLayout.setComponentAlignment(hideIcon, Alignment.TOP_RIGHT);
    typeHeaderLayout.setExpandRatio(title, 1.0F);
    addComponent(typeHeaderLayout);
}
 
Example 4
Source File: DefaultGridHeader.java    From hawkbit with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * Builds the title layout.
 *
 * @return title-layout
 */
protected HorizontalLayout buildTitleLayout() {
    titleLayout = new HorizontalLayout();
    titleLayout.addStyleName(SPUIStyleDefinitions.WIDGET_TITLE);
    titleLayout.setSpacing(false);
    titleLayout.setMargin(false);
    titleLayout.setSizeFull();
    titleLayout.addComponent(prefixWithTitle);
    titleLayout.setComponentAlignment(prefixWithTitle, Alignment.TOP_LEFT);
    titleLayout.setExpandRatio(prefixWithTitle, 0.8F);

    if (hasHeaderMaximizeSupport()) {
        titleLayout.addComponents(getHeaderMaximizeSupport().maxMinButton);
        titleLayout.setComponentAlignment(getHeaderMaximizeSupport().maxMinButton, Alignment.TOP_RIGHT);
        titleLayout.setExpandRatio(getHeaderMaximizeSupport().maxMinButton, 0.2F);
    }

    return titleLayout;
}
 
Example 5
Source File: AbstractChartDataManagerImpl.java    From cia with Apache License 2.0 5 votes vote down vote up
/**
 * 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);
}
 
Example 6
Source File: AbstractHawkbitLoginUI.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
private Component buildDisclaimer() {
    final HorizontalLayout fields = new HorizontalLayout();
    fields.setSpacing(true);
    fields.addStyleName("disclaimer");

    final Label disclaimer = new Label(uiProperties.getDemo().getDisclaimer(), ContentMode.HTML);
    disclaimer.setCaption(i18n.getMessage("label.login.disclaimer"));
    disclaimer.setIcon(FontAwesome.EXCLAMATION_CIRCLE);
    disclaimer.setId("login-disclaimer");
    disclaimer.setWidth("525px");

    fields.addComponent(disclaimer);

    return fields;
}
 
Example 7
Source File: AbstractHawkbitLoginUI.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
protected Component buildLinks() {

        final HorizontalLayout links = new HorizontalLayout();
        links.setSpacing(true);
        links.addStyleName("links");
        final String linkStyle = "v-link";

        if (!uiProperties.getLinks().getDocumentation().getRoot().isEmpty()) {
            final Link docuLink = SPUIComponentProvider.getLink(UIComponentIdProvider.LINK_DOCUMENTATION,
                    i18n.getMessage("link.documentation.name"), uiProperties.getLinks().getDocumentation().getRoot(),
                    FontAwesome.QUESTION_CIRCLE, "_blank", linkStyle);
            links.addComponent(docuLink);
            docuLink.addStyleName(ValoTheme.LINK_SMALL);
        }

        if (!uiProperties.getLinks().getRequestAccount().isEmpty()) {
            final Link requestAccountLink = SPUIComponentProvider.getLink(UIComponentIdProvider.LINK_REQUESTACCOUNT,
                    i18n.getMessage("link.requestaccount.name"), uiProperties.getLinks().getRequestAccount(),
                    FontAwesome.SHOPPING_CART, "", linkStyle);
            links.addComponent(requestAccountLink);
            requestAccountLink.addStyleName(ValoTheme.LINK_SMALL);
        }

        if (!uiProperties.getLinks().getUserManagement().isEmpty()) {
            final Link userManagementLink = SPUIComponentProvider.getLink(UIComponentIdProvider.LINK_USERMANAGEMENT,
                    i18n.getMessage("link.usermanagement.name"), uiProperties.getLinks().getUserManagement(),
                    FontAwesome.USERS, "_blank", linkStyle);
            links.addComponent(userManagementLink);
            userManagementLink.addStyleName(ValoTheme.LINK_SMALL);
        }

        return links;
    }
 
Example 8
Source File: TargetFilterHeader.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
private static HorizontalLayout createHeaderFilterIconLayout() {
    final HorizontalLayout titleFilterIconsLayout = new HorizontalLayout();
    titleFilterIconsLayout.addStyleName(SPUIStyleDefinitions.WIDGET_TITLE);
    titleFilterIconsLayout.setSpacing(false);
    titleFilterIconsLayout.setMargin(false);
    titleFilterIconsLayout.setSizeFull();
    return titleFilterIconsLayout;
}
 
Example 9
Source File: UploadProgressInfoWindow.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
private HorizontalLayout getCaptionLayout() {
    final HorizontalLayout captionLayout = new HorizontalLayout();
    captionLayout.setSizeFull();
    captionLayout.setHeight("36px");
    captionLayout.addComponents(windowCaption, closeButton);
    captionLayout.setExpandRatio(windowCaption, 1.0F);
    captionLayout.addStyleName("v-window-header");
    return captionLayout;
}
 
Example 10
Source File: AbstractTableHeader.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
private static HorizontalLayout createHeaderFilterIconLayout() {
    final HorizontalLayout titleFilterIconsLayout = new HorizontalLayout();
    titleFilterIconsLayout.addStyleName(SPUIStyleDefinitions.WIDGET_TITLE);
    titleFilterIconsLayout.setSpacing(false);
    titleFilterIconsLayout.setMargin(false);
    titleFilterIconsLayout.setSizeFull();
    return titleFilterIconsLayout;
}
 
Example 11
Source File: AbstractGridHeader.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
private static HorizontalLayout createHeaderFilterIconLayout() {
    final HorizontalLayout titleFilterIconsLayout = new HorizontalLayout();
    titleFilterIconsLayout.addStyleName(SPUIStyleDefinitions.WIDGET_TITLE);
    titleFilterIconsLayout.setSpacing(false);
    titleFilterIconsLayout.setMargin(false);
    titleFilterIconsLayout.setSizeFull();
    return titleFilterIconsLayout;
}
 
Example 12
Source File: ServerDescDetail.java    From primecloud-controller with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void attach() {
    setHeight("100%");
    addStyleName(Reindeer.PANEL_LIGHT);

    VerticalLayout panel = (VerticalLayout) getContent();
    panel.setWidth("100%");
    panel.setHeight("100%");
    panel.setMargin(true);
    panel.setSpacing(false);
    panel.addStyleName("server-desc-detail");

    HorizontalLayout layout = new HorizontalLayout();
    layout.setWidth("100%");
    layout.setHeight("100%");
    layout.setMargin(true);
    layout.setSpacing(true);
    layout.addStyleName("server-desc-detail");

    left = new DetailInfo();
    left.setWidth("200px");
    layout.addComponent(left);

    right = new DetailParameters();
    right.setWidth("100%");
    right.setHeight("100%");
    layout.addComponent(right);

    layout.setExpandRatio(right, 100);

    panel.addComponent(layout);
    panel.setExpandRatio(layout, 1.0f);
}
 
Example 13
Source File: CommonDialogWindow.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
private HorizontalLayout createActionButtonsLayout() {

        buttonsLayout = new HorizontalLayout();
        buttonsLayout.setSizeFull();
        buttonsLayout.setSpacing(true);
        buttonsLayout.setSpacing(true);
        buttonsLayout.addStyleName("actionButtonsMargin");

        createSaveButton();
        createCancelButton();

        addHelpLink();

        return buttonsLayout;
    }
 
Example 14
Source File: AbstractMetadataPopupLayout.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
private void buildLayout() {
    final HorizontalLayout headerLayout = new HorizontalLayout();
    headerLayout.addStyleName(SPUIStyleDefinitions.WIDGET_TITLE);
    headerLayout.setSpacing(false);
    headerLayout.setMargin(false);
    headerLayout.setSizeFull();
    headerLayout.addComponent(headerCaption);
    if (hasCreatePermission()) {
        headerLayout.addComponents(addIcon);
        headerLayout.setComponentAlignment(addIcon, Alignment.MIDDLE_RIGHT);
    }
    headerLayout.setExpandRatio(headerCaption, 1.0F);

    final HorizontalLayout headerWrapperLayout = new HorizontalLayout();
    headerWrapperLayout.addStyleName("bordered-layout" + " " + "no-border-bottom" + " " + "metadata-table-margin");
    headerWrapperLayout.addComponent(headerLayout);
    headerWrapperLayout.setWidth("100%");
    headerLayout.setHeight("30px");

    final VerticalLayout tableLayout = new VerticalLayout();
    tableLayout.setSizeFull();
    tableLayout.setHeight("100%");
    tableLayout.addComponent(headerWrapperLayout);
    tableLayout.addComponent(metaDataGrid);
    tableLayout.addStyleName("table-layout");
    tableLayout.setExpandRatio(metaDataGrid, 1.0F);

    final VerticalLayout metadataFieldsLayout = createMetadataFieldsLayout();

    mainLayout = new HorizontalLayout();
    mainLayout.addComponent(tableLayout);
    mainLayout.addComponent(metadataFieldsLayout);
    mainLayout.setExpandRatio(tableLayout, 0.5F);
    mainLayout.setExpandRatio(metadataFieldsLayout, 0.5F);
    mainLayout.setSizeFull();
    mainLayout.setSpacing(true);
    setCompositionRoot(mainLayout);
    setSizeFull();
}
 
Example 15
Source File: ServiceDescBasic.java    From primecloud-controller with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void attach() {
    addStyleName(Reindeer.PANEL_LIGHT);
    setHeight("100%");

    HorizontalLayout layout = new HorizontalLayout();
    layout.setWidth("100%");
    layout.setHeight("100%");
    layout.setMargin(true);
    layout.setSpacing(true);
    layout.addStyleName("service-desc-basic");
    setContent(layout);

    // サービス基本情報
    VerticalLayout leftLayout = new VerticalLayout();
    leftLayout.setMargin(false);
    leftLayout.setSpacing(false);
    leftLayout.setWidth("100%");
    leftLayout.setHeight("100%");

    left = new BasicInfoOpe();
    left.setWidth("100%");
    leftLayout.addComponent(left);
    leftLayout.setExpandRatio(left, 1.0f);
    layout.addComponent(leftLayout);

    // 表同士の間隔をあける
    Label padding = new Label(" ");
    padding.setWidth("7px");
    padding.setHeight("99%");
    padding.addStyleName("desc-padding");
    layout.addComponent(padding);

    Label padding2 = new Label("");
    padding2.setWidth("1px");
    layout.addComponent(padding2);

    // 割り当てサーバ
    VerticalLayout rightLayout = new VerticalLayout();
    rightLayout.setMargin(false);
    rightLayout.setSpacing(false);
    rightLayout.setWidth("100%");
    rightLayout.setHeight("100%");

    right = new AttachServersOpe();
    right.setWidth("100%");
    rightLayout.addComponent(right);
    serverOpe = new ServiceSvrOperation();
    rightLayout.addComponent(serverOpe);
    rightLayout.setExpandRatio(right, 1.0f);
    layout.addComponent(rightLayout);

    layout.setExpandRatio(leftLayout, 40);
    layout.setExpandRatio(rightLayout, 60);
}
 
Example 16
Source File: ConfirmationDialog.java    From hawkbit with Eclipse Public License 1.0 4 votes vote down vote up
/**
 * Constructor for configuring confirmation dialog.
 *
 * @param caption
 *            the dialog caption.
 * @param question
 *            the question.
 * @param okLabel
 *            the Ok button label.
 * @param cancelLabel
 *            the cancel button label.
 * @param callback
 *            the callback.
 * @param icon
 *            the icon of the dialog
 * @param id
 *            the id of the confirmation dialog
 * @param tab
 *            ConfirmationTab which contains more information about the action
 *            which has to be confirmed, e.g. maintenance window
 * @param mapCloseToCancel
 *            Flag indicating whether or not the close event on the enclosing
 *            window should be mapped to a cancel event.
 */
public ConfirmationDialog(final String caption, final String question, final String okLabel,
        final String cancelLabel, final ConfirmationDialogCallback callback, final Resource icon, final String id,
        final ConfirmationTab tab, final boolean mapCloseToCancel) {
    window = new Window(caption);
    if (!StringUtils.isEmpty(id)) {
        window.setId(id);
    }
    window.addStyleName(SPUIStyleDefinitions.CONFIRMATION_WINDOW_CAPTION);

    if (icon != null) {
        window.setIcon(icon);
    }

    okButton = createOkButton(okLabel);

    final Button cancelButton = createCancelButton(cancelLabel);
    if (mapCloseToCancel) {
        window.addCloseListener(e -> {
            if (!isImplicitClose) {
                cancelButton.click();
            }
        });
    }
    window.setModal(true);
    window.addStyleName(SPUIStyleDefinitions.CONFIRMBOX_WINDOW_STYLE);
    if (this.callback == null) {
        this.callback = callback;
    }
    final VerticalLayout vLayout = new VerticalLayout();
    if (question != null) {
        vLayout.addComponent(createConfirmationQuestion(question));
    }
    if (tab != null) {
        vLayout.addComponent(tab);
    }

    final HorizontalLayout hButtonLayout = createButtonLayout(cancelButton);
    hButtonLayout.addStyleName("marginTop");
    vLayout.addComponent(hButtonLayout);
    vLayout.setComponentAlignment(hButtonLayout, Alignment.BOTTOM_CENTER);

    window.setContent(vLayout);
    window.setResizable(false);
}
 
Example 17
Source File: LoadBalancerDescServer.java    From primecloud-controller with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void attach() {
    addStyleName(Reindeer.PANEL_LIGHT);
    setHeight("100%");

    VerticalLayout panel = (VerticalLayout) getContent();
    panel.setWidth("100%");
    panel.setHeight("100%");
    panel.setMargin(true);
    panel.setSpacing(false);
    panel.addStyleName("loadbalancer-desc-basic");

    HorizontalLayout layout = new HorizontalLayout();
    layout.setWidth("100%");
    layout.setHeight("100%");
    layout.setMargin(true);
    layout.setSpacing(true);
    layout.addStyleName("loadbalancer-desc-basic");

    // ロードバランサ詳細情報
    VerticalLayout leftLayout = new VerticalLayout();
    leftLayout.setWidth("100%");
    leftLayout.setHeight("100%");
    leftLayout.setMargin(true, false, false, false);
    leftLayout.setSpacing(false);

    loadBalancerInfo = new LoadBalancerDetailInfo();
    leftLayout.addComponent(loadBalancerInfo);
    leftLayout.setExpandRatio(loadBalancerInfo, 10);
    layout.addComponent(leftLayout);

    // 表同士の間隔をあける
    Label padding = new Label(" ");
    padding.setWidth("7px");
    padding.setHeight("99%");
    padding.addStyleName("desc-padding");
    layout.addComponent(padding);

    Label padding2 = new Label("");
    padding2.setWidth("1px");
    layout.addComponent(padding2);

    // 割り当てサーバ
    VerticalLayout rightLayout = new VerticalLayout();
    rightLayout.setWidth("100%");
    rightLayout.setHeight("100%");
    rightLayout.setMargin(false);
    rightLayout.setSpacing(false);
    rightLayout.addStyleName("loadbalancer-desc-server-right");

    attachServiceServerTable = new AttachSeriviceServerTable();
    rightLayout.addComponent(attachServiceServerTable);
    loadBalancerOpe = new LoadbalancerServerOperation();
    rightLayout.addComponent(loadBalancerOpe);
    rightLayout.setExpandRatio(attachServiceServerTable, 100);
    layout.addComponent(rightLayout);

    layout.setExpandRatio(leftLayout, 48);
    layout.setExpandRatio(rightLayout, 52);

    panel.addComponent(layout);
}
 
Example 18
Source File: ServerDescBasic.java    From primecloud-controller with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void attach() {
    setHeight("100%");
    addStyleName(Reindeer.PANEL_LIGHT);

    VerticalLayout layout = (VerticalLayout) getContent();
    layout.setWidth("100%");
    layout.setHeight("100%");
    layout.setMargin(true);
    layout.setSpacing(false);
    layout.addStyleName("server-desc-basic");

    HorizontalLayout layout2 = new HorizontalLayout();
    layout2.setWidth("100%");
    layout2.setHeight("100%");
    layout2.setMargin(true);
    layout2.setSpacing(true);
    layout2.addStyleName("server-desc-basic");

    // サーバ基本情報
    left = new BasicInfo();
    left.setWidth("100%");
    layout2.addComponent(left);

    // 表同士の間隔をあける
    Label padding = new Label(" ");
    padding.setWidth("7px");
    padding.setHeight("99%");
    padding.addStyleName("desc-padding");
    layout2.addComponent(padding);

    Label padding2 = new Label("");
    padding2.setWidth("1px");
    layout2.addComponent(padding2);

    // 割り当てサービス
    String enableService = Config.getProperty("ui.enableService");
    if (enableService == null || BooleanUtils.toBoolean(enableService)) {
        right = new AttachService();
        right.setHeight("100%");
        right.setWidth("100%");
        layout2.addComponent(right);
    }

    layout2.setExpandRatio(left, 40);
    if (right != null) {
        layout2.setExpandRatio(right, 60);
    } else {
        VerticalLayout dummyLayout = new VerticalLayout();
        dummyLayout.setSizeFull();
        layout2.addComponent(dummyLayout);
        layout2.setExpandRatio(dummyLayout, 60);
    }

    layout.addComponent(layout2);
    layout.setExpandRatio(layout2, 1.0f);
}
 
Example 19
Source File: LoginView.java    From gazpachoquest with GNU General Public License v3.0 4 votes vote down vote up
protected CssLayout createCompositionRoot() {
    CssLayout root = new CssLayout();
    root.setSizeFull();
    root.addStyleName(Reindeer.LAYOUT_BLUE);

    VerticalLayout loginLayout = new VerticalLayout();
    loginLayout.setSizeFull();
    loginLayout.addStyleName("login-layout");
    root.addComponent(loginLayout);

    final CssLayout loginPanel = new CssLayout();
    loginPanel.addStyleName("login-panel");
    loginLayout.addComponent(loginPanel);

    HorizontalLayout labels = new HorizontalLayout();
    labels.setWidth("100%");
    labels.setMargin(true);
    labels.addStyleName("labels");
    loginPanel.addComponent(labels);

    Label welcome = new Label("Welcome");
    welcome.setSizeUndefined();
    welcome.addStyleName(Reindeer.LABEL_H2);
    labels.addComponent(welcome);
    labels.setComponentAlignment(welcome, Alignment.MIDDLE_LEFT);

    Label title = new Label("Gazpacho Quest");
    title.setSizeUndefined();
    title.addStyleName(Reindeer.LABEL_H1);
    labels.addComponent(title);
    labels.setComponentAlignment(title, Alignment.MIDDLE_RIGHT);

    HorizontalLayout fields = new HorizontalLayout();

    fields.setWidth("100%");
    fields.setSpacing(true);
    fields.setMargin(true);
    fields.addStyleName("fields");

    invitation = new TextField("Invitation");
    invitation.setSizeUndefined();
    invitation.focus();
    // invitation.setValue("YAS5ICHRBE");
    fields.addComponent(invitation);

    login = new Button("Start");
    login.addClickListener(createLoginButtonListener());
    fields.addComponent(login);
    fields.setComponentAlignment(login, Alignment.BOTTOM_LEFT);

    loginPanel.addComponent(fields);

    return root;
}
 
Example 20
Source File: LoadBalancerDescBasic.java    From primecloud-controller with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void attach() {
    addStyleName(Reindeer.PANEL_LIGHT);
    setHeight("100%");

    HorizontalLayout layout = new HorizontalLayout();
    layout.setWidth("100%");
    layout.setHeight("100%");
    layout.setMargin(true);
    layout.setSpacing(true);
    layout.addStyleName("loadbalancer-desc-basic");
    setContent(layout);

    // ロードバランサ基本情報
    basicInfo = new BasicInfo();
    basicInfo.setWidth("100%");
    layout.addComponent(basicInfo);

    // 表同士の間隔をあける
    Label padding = new Label(" ");
    padding.setWidth("7px");
    padding.setHeight("99%");
    padding.addStyleName("desc-padding");
    layout.addComponent(padding);

    Label padding2 = new Label("");
    padding2.setWidth("1px");
    layout.addComponent(padding2);

    // ロードバランサリスナ一覧
    VerticalLayout rightLayout = new VerticalLayout();
    rightLayout.setWidth("100%");
    rightLayout.setHeight("100%");
    rightLayout.setMargin(false);
    rightLayout.setSpacing(false);

    attachServiceTable = new AttachServiceTable();
    attachServiceTable.setWidth("100%");
    rightLayout.addComponent(attachServiceTable);
    loadBalancerOpe = new LoadbalancerServiceOperation();
    rightLayout.addComponent(loadBalancerOpe);
    rightLayout.setExpandRatio(attachServiceTable, 100);
    layout.addComponent(rightLayout);

    layout.setExpandRatio(basicInfo, 43);
    layout.setExpandRatio(rightLayout, 57);
}