Example usage for com.vaadin.v7.ui HorizontalLayout setWidth

List of usage examples for com.vaadin.v7.ui HorizontalLayout setWidth

Introduction

In this page you can find the example usage for com.vaadin.v7.ui HorizontalLayout setWidth.

Prototype

@Override
    public void setWidth(String width) 

Source Link

Usage

From source file:org.jpos.qi.InfoDialog.java

License:Open Source License

public InfoDialog(String caption, String info) {
    super(caption);
    setWidth("350px");
    setModal(true);/*from   w ww. j av  a2s . c o  m*/
    setResizable(false);
    close.setStyleName(ValoTheme.BUTTON_SMALL);

    VerticalLayout content = new VerticalLayout();
    content.setMargin(true);
    content.setSpacing(true);
    setContent(content);
    if (info != null) {
        Label l = new Label(info);
        l.setContentMode(ContentMode.HTML);
        content.addComponent(l);
    }
    HorizontalLayout hl = new HorizontalLayout();
    hl.setMargin(new MarginInfo(true, false, false, false));
    hl.setSpacing(true);
    hl.setWidth("100%");
    hl.addComponent(close);
    hl.setComponentAlignment(close, Alignment.BOTTOM_RIGHT);
    content.addComponent(hl);
}