summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/tickets/Ticket2186.java
blob: 50b8a1f1135a94b3342e18f0a7e5d2403c2291f4 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package com.vaadin.tests.tickets;

import com.vaadin.Application;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.Panel;
import com.vaadin.ui.UI.LegacyWindow;
import com.vaadin.ui.Table;
import com.vaadin.ui.VerticalLayout;

public class Ticket2186 extends Application.LegacyApplication {

    @Override
    public void init() {
        LegacyWindow main = new LegacyWindow("Quick test");
        setMainWindow(main);

        HorizontalLayout base = new HorizontalLayout();
        main.setContent(base);

        VerticalLayout content = new VerticalLayout();

        content.addComponent(new Label("Content."));
        content.setWidth("500px");

        Table table = new Table();

        table.setPageLength(10);

        table.setWidth("100%");

        table.addContainerProperty("Lähettäjä", String.class, "");
        table.addContainerProperty("Viestin tyyppi", String.class, "");

        for (int i = 0; i < 15; i++) {

            table.addItem(new Object[] { i + " Joku Ihminen", "Testiviesti" },

            new Object());

        }

        content.addComponent(table);

        Panel right = new Panel("Panel");

        right.addComponent(new Label("Some basic text might show up here."));

        base.addComponent(content);

        base.addComponent(right);

    }
}