Package org.zkoss.zul

Examples of org.zkoss.zul.Treechildren$VisibleChildrenIterator


    @SuppressWarnings("unchecked")
    public static void handleSelectionAdded(Tree tree, Set<Treeitem> delta) {
        for (Treeitem parent : delta) {
            tree.addItemToSelection(parent);
            Treechildren children = parent.getTreechildren();
            if (children != null) {
                Collection<Treeitem> col = children.getItems();
                if (col != null) {
                    for (Treeitem item : col) {
                        tree.addItemToSelection(item);
                    }
                }
View Full Code Here


    @SuppressWarnings("unchecked")
    private void handleSelectionRemoved(Tree tree, Set<Treeitem> delta) {
        for (Treeitem parent : delta) {
           
            Treechildren children = parent.getTreechildren();
            if (children != null) {
                Collection<Treeitem> col = children.getItems();
                if (col != null) {
                    for (Treeitem item : col) {
                        tree.removeItemFromSelection(item);
                    }
                }
View Full Code Here

    treeitem.setOpen(open);

    final ILabelElement item = insertTreeCell(treeitem);

    final Treechildren treechildren = new Treechildren();
    treeitem.appendChild(treechildren);

    return new MenuFactoryDto(treechildren, item);
  }
View Full Code Here

    // tree.setSizedByContent(true);
    // tree.setZclass("z-dottree");
    mainMenuTree.setStyle("overflow:auto; border: none;");
    mainMenuTree.setParent(gb);

    final Treechildren treechildren = new Treechildren();
    mainMenuTree.appendChild(treechildren);

    // generate the treeMenu from the menuXMLFile
    // ZkossTreeMenuFactory.addMainMenu(treechildren);
    getTreeMainMenuFactory().addMenu(treechildren);
View Full Code Here

        resourceLoadList.expand(line, closed);
    }

    private List<LoadTimeLine> calculatedClosedItems(Treeitem item) {
        List<LoadTimeLine> result = new ArrayList<LoadTimeLine>();
        Treechildren treeChildren = item.getTreechildren();
        if (treeChildren != null) {
            List<Treeitem> myTreeItems = (List<Treeitem>) treeChildren
                    .getChildren();
            Iterator<Treeitem> iterator = myTreeItems.iterator();
            while (iterator.hasNext()) {
                Treeitem child = (Treeitem) iterator.next();
                if (!child.isOpen()) {
View Full Code Here

                List<Treeitem> treeItems = parent.getParent().getChildren();
                int myPosition = parent.indexOf();

                if (myPosition > 0) {
                    // the current node is not the first brother
                    Treechildren treechildren = treeItems.get(myPosition - 1)
                            .getTreechildren();
                    if (treechildren == null
                            || treechildren.getChildren().size() == 0) {
                        // the previous brother doesn't have children,
                        // or it has children but they are unloaded
                        Treerow upTreerow = treeItems.get(myPosition - 1)
                                .getTreerow();
View Full Code Here

                                    .getParent(), position, true);
                        }
                    }
                } else {
                    // Moving from a parent node to its children
                    Treechildren treechildren = parent.getTreechildren();

                    if (treechildren.getChildren().size() == 0) {
                        // the children are unloaded yet
                        focusGoDown(parent, position, true);
                        return;
                    }
                    Treerow downTreerow = ((Treeitem) treechildren
                            .getChildren().get(0)).getTreerow();

                    if (!downTreerow.isVisible()) {
                        // children are loaded but not visible
                        focusGoDown(parent, position, true);
View Full Code Here

        Util.reloadBindings(tree);
    }

    public void disabledCodeBoxes(boolean disabled) {
        Set<Treeitem> childrenSet = new HashSet<Treeitem>();
        Treechildren treeChildren = tree.getTreechildren();
        if (treeChildren != null) {
            childrenSet.addAll((Collection<Treeitem>) treeChildren.getItems());
        }
        for (Treeitem each : childrenSet) {
            disableCodeBoxes(each, disabled);
        }
    }
View Full Code Here

                .get(1)).getChildren().get(0);
        codeBox.setDisabled(disabled);
        codeBox.invalidate();

        Set<Treeitem> childrenSet = new HashSet<Treeitem>();
        Treechildren children = item.getTreechildren();
        if (children != null) {
            childrenSet.addAll((Collection<Treeitem>) children.getItems());
        }

        for (Treeitem each : childrenSet) {
            disableCodeBoxes(each, disabled);
        }
View Full Code Here

        children.add(expandAllButton);
    }

    public void expandAll() {
        Set<Treeitem> childrenSet = new HashSet<Treeitem>();
        Treechildren children = tree.getTreechildren();
        if(children != null) {
            childrenSet.addAll((Collection<Treeitem>) children.getItems());
        }
        for(Treeitem each: childrenSet) {
            expandAll(each);
        }
    }
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Treechildren$VisibleChildrenIterator

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.