aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/main/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutPrimaryStylename.java
blob: 23a138bcf3d26c9b3784d4c1838b2788ce2f13ee (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
package com.vaadin.tests.components.absolutelayout;

import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.AbsoluteLayout;
import com.vaadin.ui.Button;
import com.vaadin.ui.Component;
import com.vaadin.ui.NativeButton;

public class AbsoluteLayoutPrimaryStylename extends TestBase {

    @Override
    protected void setup() {
        final AbsoluteLayout layout = new AbsoluteLayout();
        layout.setWidth("100px");
        layout.setWidth("200px");
        layout.setPrimaryStyleName("my-absolute-layout");

        Component comp1 = new NativeButton("Child 1");
        comp1.setWidth("100%");
        comp1.setHeight("50px");
        layout.addComponent(comp1);

        addComponent(layout);

        addComponent(new Button("Change primary stylename", event -> layout
                .setPrimaryStyleName("my-second-absolute-layout")));
    }

    @Override
    protected String getDescription() {
        return "Absolutelayout should handle setting primary stylename both initially and dynamically";
    }

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

}