blob: 76a3ec10a23fb548a4009e94c0c19e173aa9126a (
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
|
package com.vaadin.tests.components.tabsheet;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractReindeerTestUI;
import com.vaadin.ui.Button;
import com.vaadin.ui.Label;
import com.vaadin.ui.TabSheet;
import com.vaadin.ui.VerticalLayout;
@SuppressWarnings("serial")
public class FirstTabNotVisibleInTabsheet extends AbstractReindeerTestUI {
private TabSheet.Tab firstTab;
@Override
protected void setup(VaadinRequest request) {
TabSheet tabSheet = new TabSheet();
tabSheet.setWidth("600px");
firstTab = tabSheet.addTab(new Label("first visible tab"),
"first visible tab");
for (int i = 2; i < 10; i++) {
tabSheet.addTab(new Label("visible tab " + i), "visible tab " + i);
}
addComponent(new VerticalLayout(tabSheet, new Button("Toggle first tab",
event -> firstTab.setVisible(!firstTab.isVisible()))));
}
@Override
protected Integer getTicketNumber() {
return 14644;
}
@Override
protected String getTestDescription() {
return "First tabsheet tab is not set visible back once it gets invisible";
}
}
|