blob: ab1ce3bc28a52d3c60a660cf0798be26973ec1aa (
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
|
package com.vaadin.tests.components.popupview;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.*;
public class PopUpViewInTabsheet extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
CssLayout layout = new CssLayout();
addComponent(layout);
VerticalLayout popupContent = new VerticalLayout();
popupContent.setId("content");
PopupView popup = new PopupView("Pop it up", popupContent);
popupContent.addComponent(new Button("Button"));
popup.setHideOnMouseOut(false);
popup.setId("popupId");
popup.setHeight("40px");
TabSheet tabsheet = new TabSheet();
VerticalLayout tab1 = new VerticalLayout();
tab1.addComponent(popup);
tabsheet.addTab(tab1, "Mercury").setId("tab0");
VerticalLayout tab2 = new VerticalLayout();
tab2.addComponent(new TextField("Enter"));
tab2.setCaption("Venus");
tabsheet.addTab(tab2).setId("tab1");
layout.addComponent(tabsheet);
}
}
|