Search in sources :

Example 1 with Tabs

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);
}
Also used : Tabpanels(org.zkoss.zul.Tabpanels) Tabs(org.zkoss.zul.Tabs)

Example 2 with 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);
}
Also used : UITab(org.openforis.collect.metamodel.ui.UITab) Tab(org.zkoss.zul.Tab) Tabpanels(org.zkoss.zul.Tabpanels) Tabs(org.zkoss.zul.Tabs) Tabpanel(org.zkoss.zul.Tabpanel)

Example 3 with Tabs

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);
}
Also used : UITab(org.openforis.collect.metamodel.ui.UITab) Tab(org.zkoss.zul.Tab) Event(org.zkoss.zk.ui.event.Event) Tabs(org.zkoss.zul.Tabs)

Aggregations

Tabs (org.zkoss.zul.Tabs)3 UITab (org.openforis.collect.metamodel.ui.UITab)2 Tab (org.zkoss.zul.Tab)2 Tabpanels (org.zkoss.zul.Tabpanels)2 Event (org.zkoss.zk.ui.event.Event)1 Tabpanel (org.zkoss.zul.Tabpanel)1