Package org.zkoss.zul

Examples of org.zkoss.zul.Tab


  }
 
  public void add(String title, Component comp, String image) {
    RefreshableTabpanel tabpanel = new RefreshableTabpanel();
    tabpanel.appendChild(comp);
    tabs.appendChild(new Tab(title, image));
    tabpanels.appendChild(tabpanel);
  }
View Full Code Here


  public void add(String title, Class clazz, String image) {
    RefreshableTabpanel tabpanel = new RefreshableTabpanel(clazz);
    if (tabpanels.getChildren().size() == 0) {
      tabpanel.refresh();
    }
    tabs.appendChild(new Tab(title, image));
    tabpanels.appendChild(tabpanel);
  }
View Full Code Here

    int refer = endIndex > startIndex ? endIndex + 1 : endIndex;

    Tabpanels panels = (Tabpanels) getTabbox().getTabpanels();

    Tab startTab = (Tab) getChildren().get(startIndex);
    try {
      _noResponse = true;

      if (refer == getChildren().size()) {
        panels.appendChild(startTab.getLinkedPanel());
        appendChild(startTab);
      } else {
        Tab referTab = (Tab) getChildren().get(refer);
        panels.insertBefore(startTab.getLinkedPanel(), referTab.getLinkedPanel());

        insertBefore(startTab, referTab);

      }
View Full Code Here

        boolean isOpened = false;

        List cs = tbs.getChildren();
        Iterator it = cs.iterator();
        while (it.hasNext()) {
            Tab tab = (Tab) it.next();
            if (funTab_funId.equals(tab.getId())) {
                isOpened = true;
                tab.setSelected(true);
            }
        }
        return isOpened;
    }
View Full Code Here

        // if bootFlat =N , db setter not want you boot this function
        // if the tab is opened, you should not open it again
        // when judging  isOpened, if the tab is opened, set selected,
        if (!"N".equals(bootFlag) && !isOpened("funTab_" + funIdStr, tbs)) {

            Tab ntb = new Tab(funName);
            ntb.setId("funTab_" + funIdStr);
            ntb.setClosable(true);

            Tabpanel ntp = new Tabpanel();
            ntp.setId("funPanel_" + funIdStr);

            ntb.setParent(tbs);
            ntp.setParent(tps);

            Include inc = new Include(funPath);
            inc.setMode("defer");
            inc.setParent(ntp);

            //Executions.createComponents(funPath, ntp, null);



            ntb.setSelected(true);
        }


    }
View Full Code Here

        // Change the BindingListModel.
        getBranchListCtrl().getPagedBindingListWrapper().setSearchObject(searchObjBranch);

        // get the current Tab for later checking if we must change it
        final Tab currentTab = this.tabbox_BranchMain.getSelectedTab();

        // check if the tab is one of the Detail tabs. If so do not
        // change the selection of it
        if (!currentTab.equals(this.tabBranchList)) {
          this.tabBranchList.setSelected(true);
        } else {
          currentTab.setSelected(true);
        }
      }
    }
  }
View Full Code Here

    if (getBranchListCtrl().getBinder() != null) {
      getBranchListCtrl().getPagedBindingListWrapper().clearFilters();

      // get the current Tab for later checking if we must change it
      final Tab currentTab = this.tabbox_BranchMain.getSelectedTab();

      // check if the tab is one of the Detail tabs. If so do not
      // change the selection of it
      if (!currentTab.equals(this.tabBranchList)) {
        this.tabBranchList.setSelected(true);
      } else {
        currentTab.setSelected(true);
      }
    }
  }
View Full Code Here

   */
  private void doEdit(Event event) {
    // logger.debug(event.toString());

    // get the current Tab for later checking if we must change it
    final Tab currentTab = this.tabbox_BranchMain.getSelectedTab();

    // check first, if the tabs are created, if not than create it
    if (getBranchDetailCtrl() == null) {
      Events.sendEvent(new Event("onSelect", this.tabBranchDetail, null));
      // if we work with spring beanCreation than we must check a little
      // bit deeper, because the Controller are preCreated ?
    } else if (getBranchDetailCtrl().getBinder() == null) {
      Events.sendEvent(new Event("onSelect", this.tabBranchDetail, null));
    }

    // check if the tab is one of the Detail tabs. If so do not change the
    // selection of it
    if (!currentTab.equals(this.tabBranchDetail)) {
      this.tabBranchDetail.setSelected(true);
    } else {
      currentTab.setSelected(true);
    }

    // remember the old vars
    doStoreInitValues();

View Full Code Here

     * Check, if all tabs with data binded components are created So we work
     * with spring BeanCreation we must check a little bit deeper, because
     * the Controller are preCreated ? After that, go back to the
     * current/selected tab.
     */
    Tab currentTab = tabbox_BranchMain.getSelectedTab();

    if (getBranchDetailCtrl().getBinder() == null) {
      Events.sendEvent(new Event(Events.ON_SELECT, tabBranchDetail, null));
    }

    // go back to selected tab
    currentTab.setSelected(true);

    // Check which button is clicked and calculate the rowIndex
    if (((ForwardEvent) event).getOrigin().getTarget() == btnNext) {
      if (index < (blml.size() - 1)) {
        index = index + 1;
View Full Code Here

        /**
         * Check if the tab is already opened than select them and<br>
         * go out of here. If not than create them.<br>
         */

        Tab checkTab = null;
        try {
          // checkTab = (Tab) tabs.getFellow(tabName);
          checkTab = (Tab) tabs.getFellow("tab_" + tabName.trim());
          checkTab.setSelected(true);
        } catch (final ComponentNotFoundException ex) {
          // Ignore if can not get tab.
        }

        if (checkTab == null) {

          Tab tab = new Tab();
          tab.setId("tab_" + tabName.trim());
          tab.setLabel(tabName.trim());
          tab.setClosable(true);

          tab.setParent(tabs);

          Tabpanels tabpanels = (Tabpanels) center.getFellow("divCenter").getFellow("tabBoxIndexCenter").getFellow("tabsIndexCenter").getFellow("tabpanelsBoxIndexCenter");
          Tabpanel tabpanel = new Tabpanel();
          tabpanel.setHeight("100%");
          tabpanel.setStyle("padding: 0px;");
          tabpanel.setParent(tabpanels);

          /**
           * Create the page and put it in the tabs area. If zul-file
           * is not found, detach the created tab
           */
          try {
            Executions.createComponents(zulFilePathName, tabpanel, null);
            tab.setSelected(true);
          } catch (final Exception e) {
            tab.detach();
          }

        }
      } else {
        /* get an instance of the borderlayout defined in the zul-file */
 
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Tab

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.