blob: 5a2aa4c0f9a83a2d2029a07e187baa1a2ff3f533 (
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
|
package com.vaadin.tests.layouts.gridlayout;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractReindeerTestUI;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.Label;
public class GridSpanEmptyColumns extends AbstractReindeerTestUI {
@Override
protected void setup(VaadinRequest request) {
GridLayout gridLayout = new GridLayout(3, 1);
gridLayout.setWidth("1000px");
Label bigCell = new Label("big cell");
bigCell.setId("bigCell");
bigCell.setWidth("100%"); // Only to make test backwards compatible
Label smallCell = new Label("small cell");
smallCell.setId("smallCell");
smallCell.setWidth("100%"); // Only to make test backwards compatible
gridLayout.addComponent(bigCell, 0, 0, 1, 0); // spans first two columns
gridLayout.addComponent(smallCell, 2, 0, 2, 0); // last column only
addComponent(gridLayout);
}
@Override
protected String getTestDescription() {
return "A 3x1 grid has a spanned component on the first two cells and a component on the last cell. The two components should occupy 2/3 and 1/3 of the available space respectively, instead of 1/2 each.";
}
@Override
protected Integer getTicketNumber() {
return 14335;
}
}
|