blob: acb498bcee4e41ac9fa54272d8bb57a6e3c20d96 (
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.components;
import com.vaadin.tests.util.LoremIpsum;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.TextField;
public class LongTooltip extends TestBase {
@Override
public void setup() {
GridLayout gl = new GridLayout(2, 2);
gl.setSizeFull();
TextField f1 = createField();
TextField f2 = createField();
TextField f3 = createField();
TextField f4 = createField();
gl.addComponent(f1);
gl.addComponent(f2);
gl.addComponent(f3);
gl.addComponent(f4);
gl.setComponentAlignment(f1, Alignment.TOP_LEFT);
gl.setComponentAlignment(f2, Alignment.TOP_RIGHT);
gl.setComponentAlignment(f3, Alignment.BOTTOM_LEFT);
gl.setComponentAlignment(f4, Alignment.BOTTOM_RIGHT);
getLayout().setSizeFull();
getLayout().addComponent(gl);
}
private TextField createField() {
final TextField field = new TextField();
field.setDescription(LoremIpsum.get(1000));
return field;
}
@Override
protected String getDescription() {
return "For a given cursor position the tooltip should always appear with the same size in the same position. The tooltip should also always be completely on screen and not cause any scrollbars to appear.";
}
@Override
protected Integer getTicketNumber() {
return 7100;
}
}
|