Example usage for com.vaadin.v7.ui Label setContentMode

List of usage examples for com.vaadin.v7.ui Label setContentMode

Introduction

In this page you can find the example usage for com.vaadin.v7.ui Label setContentMode.

Prototype

public void setContentMode(ContentMode contentMode) 

Source Link

Document

Sets the content mode of the Label.

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 a va 2 s  .c om
    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);
}