aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/main/java/com/vaadin/tests/layouts/TreeWithBordersInLayout.java
blob: 593dd842c5ce220d15e633a3ef0156b17d125378 (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
package com.vaadin.tests.layouts;

import com.vaadin.tests.components.AbstractTestCase;
import com.vaadin.ui.Layout;
import com.vaadin.ui.LegacyWindow;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.v7.ui.Tree;

public class TreeWithBordersInLayout extends AbstractTestCase {

    private static final Object CAPTION = "caption";

    @Override
    public void init() {
        Layout mainLayout = new VerticalLayout();
        mainLayout.setSizeUndefined();
        setMainWindow(new LegacyWindow("main window", mainLayout));

        setTheme("tests-tickets");

        Tree t = new Tree();
        t.addContainerProperty(CAPTION, String.class, "");
        t.setItemCaptionPropertyId(CAPTION);
        t.addItem("Item 1").getItemProperty(CAPTION).setValue("Item 1");

        t.setSizeUndefined();
        t.setStyleName("redblueborders");
        mainLayout.addComponent(t);

    }

    @Override
    protected String getDescription() {
        return "The tree consists of one node and has a 10px blue red border and a 10px red right border. The tree node should be visible between the borders.";
    }

    @Override
    protected Integer getTicketNumber() {
        return 3915;
    }

}