blob: 5d45f721427887c924ff59ee10ab0589fefbbbfd (
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
|
package com.vaadin.tests.layouts;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.Label;
/**
* Tests removing rows from a GridLayout
*/
@SuppressWarnings("serial")
public class GridLayoutRemoveFinalRow extends TestBase {
@Override
protected void setup() {
getLayout().setSpacing(true);
final GridLayout layout = new GridLayout(2, 2);
layout.setSpacing(true);
layout.addComponent(new Label("Label1"));
layout.addComponent(new Label("Label2"));
layout.addComponent(new Label("Label3"));
layout.addComponent(new Label("Label4"));
addComponent(layout);
Button removeRowBtn = new Button("Remove row",
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
layout.removeRow(0);
}
});
addComponent(removeRowBtn);
}
@Override
protected String getDescription() {
return "Removing last row of a GridLayout throws a IllegalArgumentException";
}
@Override
protected Integer getTicketNumber() {
return 4542;
}
}
|