blob: 949acb628101f28716e07bae67c8703588fb0129 (
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
package com.vaadin.tests.tickets;
import com.vaadin.ui.Label;
import com.vaadin.ui.LegacyWindow;
import com.vaadin.ui.Panel;
import com.vaadin.ui.VerticalLayout;
public class Ticket1923 extends com.vaadin.server.LegacyApplication {
private static final int ROWS = 50;
private Panel p;
@Override
public void init() {
final LegacyWindow main = new LegacyWindow(getClass().getName()
.substring(getClass().getName().lastIndexOf(".") + 1));
setMainWindow(main);
p = new Panel("TestPanel 250x300");
// p.getLayout().setWidth("100%");
// p.setContent(new GridLayout(1, 100));
for (int i = 0; i < ROWS; i++) {
p.addComponent(new Label(
"Label"
+ i
+ " 5067w09adsfasdjfahlsdfjhalfjhaldjfhalsjdfhlajdhflajhdfljahdslfjahldsjfhaljdfhaljfdhlajsdhflajshdflkajhsdlfkjahsldfkjahsldfhalskjfdhlksjfdh857idifhaljsdfhlajsdhflajhdflajhdfljahldfjhaljdfhalsjdfhalkjdhflkajhdfljahsdlfjahlsdjfhaldjfhaljfdhlajdhflajshdfljahsdlfjhalsjdfhalskjhfdlhusfglksuhdflgjshflgjhslfghslfjghsljfglsjhfglsjhfgljshfgljshflgjhslfghsljfgsljdfglsdjhfglsjhflgkjshfldjgh"));
}
// main.getLayout().setSizeFull();
p.setHeight("300px");
p.setWidth("250px");
// p.setWidth("50%");
p.setScrollTop(100);
p.setScrollLeft(100);
main.addComponent(p);
VerticalLayout ol = new VerticalLayout();
p = new Panel("a");
p.addComponent(new Label("Longer than caption"));
ol.addComponent(p);
main.addComponent(ol);
ol = new VerticalLayout();
p = new Panel("captionasdfjahsdjfh this should be clipped god damn it");
// p.getLayout().setSizeFull();
p.setWidth("50px");
p.setHeight("100px");
p.addComponent(new Label(
"aasdfaasdfja dslkfj lakfdj lakjdf lkaj dflkaj ldfkj alsdfj laksdj flkajs dflkj sdfsadfasdfasd"));
ol.addComponent(p);
main.addComponent(ol);
ol = new VerticalLayout();
p = new Panel("300x-1");
// p.getLayout().setSizeFull();
p.setWidth("300px");
p.addComponent(new Label("Short"));
p.addComponent(new Label("Short"));
p.addComponent(new Label("Short"));
p.addComponent(new Label("Short"));
p.addComponent(new Label("Short"));
p.addComponent(new Label("Short"));
p.addComponent(new Label("Short"));
p.addComponent(new Label("Short"));
p.addComponent(new Label("Short"));
p.addComponent(new Label("Short"));
p.addComponent(new Label("Short"));
p.addComponent(new Label("Short"));
p.addComponent(new Label("Short"));
ol.addComponent(p);
main.addComponent(ol);
}
}
|