blob: b75d5931b582fb4976a448acc616df0f339ae82d (
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
|
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.Button.ClickEvent;
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",
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent 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;
}
}
|