blob: 50a60050e579b48ac672586cda7d1cf2e4e6ac2f (
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.tickets;
import com.vaadin.LegacyApplication;
import com.vaadin.ui.AbstractOrderedLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.LegacyWindow;
public class Ticket2231 extends LegacyApplication {
@Override
public void init() {
LegacyWindow w = new LegacyWindow(getClass().getSimpleName());
setMainWindow(w);
setTheme("tests-tickets");
createUI((AbstractOrderedLayout) w.getContent());
}
private void createUI(AbstractOrderedLayout layout) {
layout.setSizeUndefined();
layout.setMargin(false);
layout.setStyleName("borders");
Label l = new Label("Margin-label");
l.setStyleName("ticket2231");
layout.addComponent(l);
for (int i = 0; i < 5; i++) {
l = new Label("This is a label with border");
l.setStyleName("ticket2231-border");
if (i == 2) {
l.setWidth("100%");
l.setValue("100% wide");
} else if (i == 4) {
l.setWidth("20em");
l.setValue("20em wide");
}
// l.addStyleName("ticket2231");
layout.addComponent(l);
}
}
}
|