aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/main/java/com/vaadin/tests/htmlimport/HtmlImportUI.java
blob: ee6104fded180666701e7390bff920654d292e73 (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
package com.vaadin.tests.htmlimport;

import com.vaadin.annotations.HtmlImport;
import com.vaadin.annotations.JavaScript;
import com.vaadin.annotations.Widgetset;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Label;

@JavaScript("webcomponents-lite.min.js")
@JavaScript("ui.js")
@HtmlImport("ui.html")
@Widgetset("com.vaadin.DefaultWidgetSet")
public class HtmlImportUI extends AbstractTestUI {

    @HtmlImport("label.html")
    @JavaScript("label.js")
    public static class LabelWithImports extends Label {

        public LabelWithImports(String text) {
            super(text);
        }
    }

    @HtmlImport("label2.html")
    @JavaScript("label2.js")
    public static class Label2WithImports extends LabelWithImports {

        public Label2WithImports(String text) {
            super(text);
        }
    }

    @HtmlImport("labelX.html")
    @JavaScript("labelX.js")
    public static class LabelXWithImports extends LabelWithImports {

        public LabelXWithImports(String text) {
            super(text);
        }
    }

    @Override
    protected void setup(VaadinRequest request) {
        addComponent(new Label2WithImports("Foo"));
        addComponent(new LabelXWithImports("Foo"));
    }

}