blob: 615f391613acf9ea0c80a03865e4111bcfe389a9 (
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
55
56
57
|
package com.vaadin.tests.components.window;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
public class WindowStyleNames extends TestBase {
@Override
protected String getDescription() {
return "Click 'add style' to add a 'new' style to the window. The 'old' style should disappear and only the 'new' style should be set. Verify using e.g. firebug";
}
@Override
protected Integer getTicketNumber() {
return 3059;
}
@Override
protected void setup() {
setWindowStyle("old");
addComponent(new Button("Set style to 'new'", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
setWindowStyle("new");
}
}));
addComponent(new Button("Set style to 'custom'", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
setWindowStyle("custom");
}
}));
addComponent(new Button("Add 'foo' style", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
getMainWindow().addStyleName("foo");
}
}));
}
protected void setWindowStyle(String string) {
getMainWindow().setStyleName(string);
}
}
|