aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/components/textfield/TextFieldInLayoutInTable.java
blob: c32854f6f135a63b2bcdd8f51ac335ca42f5f762 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package com.vaadin.tests.components.textfield;

import com.vaadin.Application;
import com.vaadin.ui.Component;
import com.vaadin.ui.Panel;
import com.vaadin.ui.Table;
import com.vaadin.ui.TextField;
import com.vaadin.ui.UI.LegacyWindow;
import com.vaadin.ui.VerticalLayout;

public class TextFieldInLayoutInTable extends Application {

    @Override
    public void init() {

        final LegacyWindow mainWindow = new LegacyWindow(this.getClass()
                .getName());
        setMainWindow(mainWindow);

        final Table table = new Table();
        table.addContainerProperty("column1", Component.class, null);
        final Panel panel = new Panel("Panel");
        ((VerticalLayout) panel.getContent()).setMargin(false);
        VerticalLayout vl = new VerticalLayout();
        final TextField textField = new TextField();
        vl.addComponent(textField);

        table.addItem(new Object[] { vl }, 1);

        table.setSizeFull();
        mainWindow.addComponent(table);
    }

}