center.add(tabPanel);
center.layout();
}
public void onShowPage(Entry entry) {
Page page = entry.get("page");
if (page == null) {
page = new Page(entry);
entry.set("page", page);
}
TabItem item = tabPanel.findItem("page__"+page.getId(), false);
if (item == null) {
item = new TabItem();
item.setData("entry", entry);
item.setClosable(entry.isClosable());
item.setId("page__"+page.getId());
item.setText(entry.getName());
item.setLayout(new FitLayout());
item.add(page);
tabPanel.add(item);
}