mainTabSet.setWidth100();
mainTabSet.setHeight100();
this.mainTabSet.addTab(new Tab(TITLE_MAIL));
Tab addressTab = new Tab(TITLE_ADDRESSBOOK);
addressTab.setPane(new AddressbookCanvas());
this.mainTabSet.addTab(addressTab);
this.mainTabSet.addTab(new Tab(TITLE_CALENDAR));
this.mainTabSet.addTab(new Tab(TITLE_PREFERNCES));
this.mainTabSet.setSelectedTab(1);
this.mainTabSet.addTabSelectedHandler(new TabSelectedHandler() {
public void onTabSelected(TabSelectedEvent event) {
if (TITLE_MAIL.equals(event.getTab().getTitle())) {
if (event.getTab().getPane() == null) {
final Tab tab = event.getTab();
tab.setPane(new MailCanvas());
}
}
if (TITLE_ADDRESSBOOK.equals(event.getTab().getTitle())) {
if (event.getTab().getPane() == null) {
final Tab tab = event.getTab();
tab.setPane(new AddressbookCanvas());
}
}
}
});
}