Example usage for com.vaadin.ui TextArea setRows

List of usage examples for com.vaadin.ui TextArea setRows

Introduction

In this page you can find the example usage for com.vaadin.ui TextArea setRows.

Prototype

public void setRows(int rows) 

Source Link

Document

Sets the number of rows in the text area.

Usage

From source file:ru.codeinside.gses.activiti.ReadOnly.java

License:Mozilla Public License

public ReadOnly(String labelValue, String value, boolean valid) {
    this.valid = valid;
    if (value == null || value.length() < 4000) {
        setSizeFull();/*from w  w w. jav  a 2s . co m*/
        Label label = new Label(labelValue);
        label.setSizeFull();
        label.setStyleName("left");
        HorizontalLayout layout = new HorizontalLayout(); //   GridLayout
        layout.setSizeFull();
        layout.addComponent(label);
        layout.setExpandRatio(label, 1f);
        setCompositionRoot(layout);
    } else {
        setSizeFull();
        TextArea area = new TextArea();
        area.setValue(value);
        area.setReadOnly(true);
        area.setSizeFull();
        area.setRows(25);
        setCompositionRoot(area);
    }
    if (valid) {
        setValue(value);
    }
}

From source file:vaadinTicket.TableBugApplication.java

License:Apache License

@Override
public void init() {
    setMainWindow(main);/*w  w w .j  av a 2s  . co m*/
    Table table = new Table();
    table.addContainerProperty("prop1", String.class, "default");
    table.addContainerProperty("prop2", String.class, "default2");
    TextArea textArea = new TextArea();
    textArea.setDescription("Description");
    textArea.setRows(10);
    textArea.setColumns(10);
    VerticalLayout layout = new VerticalLayout();
    SuggestionBox suggestionBox = new SuggestionBox();

    suggestionBox.setHeight("200px");
    layout.addComponent(suggestionBox);
    layout.addComponent(textArea);

    main.setContent(layout);

    suggestionBox.setDescription("suggestion box!!!");
    textArea.setDescription("text area!!!!");

    //        for(int i=0; i<1000; ++i){
    //            table.removeAllItems();
    //            for(int j=0; j<2000; ++j){
    //                table.addItem();
    //            }
    //        }

}