Example usage for com.vaadin.ui VerticalLayout getWidth

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

Introduction

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

Prototype

@Override
    public float getWidth() 

Source Link

Usage

From source file:probe.com.model.util.vaadintoimageutil.Convertor.java

private JPanel convertVerticalLayout(VerticalLayout vaadinVerticalLayout) {

    JPanel verticalComponent = new JPanel();
    verticalComponent.setSize((int) vaadinVerticalLayout.getWidth(), (int) vaadinVerticalLayout.getHeight());
    verticalComponent.setBackground(backgroundMap.get(vaadinVerticalLayout.getStyleName()));
    return verticalComponent;
}

From source file:probe.com.view.core.PopupInfoBtn.java

private VerticalLayout initPopupLayout(VerticalLayout popupLayout, String header) {
    VerticalLayout popupBodyWrapper = new VerticalLayout();
    popupBodyWrapper.setWidth("100%");
    popupBodyWrapper.setHeight("100%");
    VerticalLayout popupBodyLayout = new VerticalLayout();
    popupBodyLayout.setWidth((popupLayout.getWidth() + 2) + "px");
    popupBodyLayout.setHeightUndefined();
    popupBodyLayout.setStyleName("pupupbody");
    popupBodyLayout.setSpacing(true);//from   www  .ja  v  a 2  s. c om
    HorizontalLayout titleLayout = new HorizontalLayout();
    titleLayout.setWidthUndefined();
    titleLayout.setHeight("40px");

    popupBodyLayout.addComponent(titleLayout);
    popupBodyLayout.addLayoutClickListener(this);

    Label label = new Label("<b>" + header + "</b>");
    label.setStyleName("comparisonHeaders");
    label.setContentMode(ContentMode.HTML);
    label.setWidth((popupLayout.getWidth() - 17) + "px");
    titleLayout.addComponent(label);

    VerticalLayout closeBtn = new VerticalLayout();
    closeBtn.setWidth("16px");
    closeBtn.setHeight("16px");
    closeBtn.setStyleName("closepanelbtn");
    closeBtn.addLayoutClickListener(this);
    titleLayout.addComponent(closeBtn);
    titleLayout.setComponentAlignment(closeBtn, Alignment.TOP_RIGHT);

    popupLayout.setMargin(true);
    popupLayout.setSpacing(true);
    popupBodyLayout.addComponent(popupLayout);
    popupBodyWrapper.addComponent(popupBodyLayout);
    popupBodyWrapper.setComponentAlignment(popupBodyLayout, Alignment.MIDDLE_CENTER);

    return popupBodyWrapper;

}