private Button b[] = new Button[4];
@Override
protected void setup() {
try {
pv[0] = new PopupView("Popupview 1 - no component", null);
addComponent(pv[0]);
b[0] = new Button("Open popupview 1", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
pv[0].setPopupVisible(true);
}
});
} catch (Exception e) {
getMainWindow()
.showNotification(
"Error, 'null content' should not throw an exception at this point",
Notification.TYPE_ERROR_MESSAGE);
}
try {
pv[1] = new PopupView(null, new TextField(
"Empty html, contains component"));
addComponent(pv[1]);
b[1] = new Button("Open popupview 2", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
pv[1].setPopupVisible(true);
}
});
} catch (Exception e) {
getMainWindow()
.showNotification(
"Error, 'null html', should not throw an exception at this point",
Notification.TYPE_ERROR_MESSAGE);
}
try {
pv[2] = new PopupView(null, null);
addComponent(pv[2]);
b[2] = new Button("Open popupview 3", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
pv[2].setPopupVisible(true);
}
});
} catch (Exception e) {
getMainWindow()
.showNotification(
"Error, 'null html, null content', should not throw an exception at this point",
Notification.TYPE_ERROR_MESSAGE);
}
try {
pv[3] = new PopupView("Popupview 4 - has component", new TextField(
"This is the content of popupview 4"));
addComponent(pv[3]);
b[3] = new Button("Open popupview 4", new ClickListener() {
@Override