private TabSheet fixedSizeTabSheet;
private TabSheet autoWideTabSheet;
@Override
protected void setup() {
fixedSizeTabSheet = new TabSheet();
fixedSizeTabSheet.setHeight("200px");
fixedSizeTabSheet.setWidth("400px");
for (int i = 0; i < 100; i++) {
Button b = new Button("Hide this tab (" + i + ")",
new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
fixedSizeTabSheet.getTab(event.getButton())
.setVisible(false);
}
});
Tab t = fixedSizeTabSheet.addTab(b, "Tab " + i, null);
if (i % 2 == 0) {
t.setVisible(false);
}
}
addComponent(fixedSizeTabSheet);
autoWideTabSheet = new TabSheet();
autoWideTabSheet.setHeight("200px");
autoWideTabSheet.setWidth(null);
for (int i = 0; i < 10; i++) {
Button b = new Button("Hide this tab (" + i + ")",