use of org.zkoss.zul.Tabs in project collect by openforis.
the class TabsGroupContainer method cleanTabs.
// private void addNewTab() {
// Tabs tabs = tabbox.getTabs();
// tabs.removeChild(newChildTab);
// UITab uiTab = new UITab();
// int position = tabsGroup.getTabs().size() + 1;
// String tabName = "tab_" + position;
// uiTab.setName(tabName);
// addTab(uiTab);
// addNewChildTab();
// }
private void cleanTabs() {
Tabpanels tabpanels = tabbox.getTabpanels();
Tabs tabs = tabbox.getTabs();
Components.removeAllChildren(tabpanels);
Components.removeAllChildren(tabs);
}
use of org.zkoss.zul.Tabs in project collect by openforis.
the class TabsGroupContainer method addTab.
// private void addNewTab() {
// Tabs tabs = tabbox.getTabs();
// tabs.removeChild(newChildTab);
// UITab uiTab = new UITab();
// int position = tabsGroup.getTabs().size() + 1;
// String tabName = "tab_" + position;
// uiTab.setName(tabName);
// addTab(uiTab);
// addNewChildTab();
// }
private void addTab(UITab uiTab) {
Tabs tabs = tabbox.getTabs();
Tab tab = new Tab();
// tab.setLabel(uiTab.getLabel());
tabs.appendChild(tab);
Tabpanels tabpanels = tabbox.getTabpanels();
Tabpanel tabpanel = new Tabpanel();
tabpanels.appendChild(tabpanel);
}
use of org.zkoss.zul.Tabs in project collect by openforis.
the class TabsGroupContainer method addNewChildTab.
private void addNewChildTab() {
newChildTab = new Tab();
newChildTab.setLabel("+");
newChildTab.addEventListener("onClick", new EventListener<Event>() {
@Override
public void onEvent(Event event) throws Exception {
postAddTabCommand();
}
});
Tabs tabs = tabbox.getTabs();
tabs.appendChild(newChildTab);
}