Package org.jitterbit.ui.widget.tree

Examples of org.jitterbit.ui.widget.tree.KongaTreeNode


    public void collapseAll() {
        tree.collapseAll();
    }

    public void expandRootFolders() {
        KongaTreeNode root = treeModel.getRoot();
        if (root.getUserObject() instanceof IntegrationProject) {
            int childCount = treeModel.getChildCount(root);
            for (int n = 0; n < childCount; ++n) {
                KongaTreeNode child = treeModel.getChild(root, n);
                tree.makeNodeExpanded(child);
            }
        }
    }
View Full Code Here


    }

    private IntegrationEntityTreeNode createNodeForFolder(Folder f) {
        IntegrationEntityTreeNode folderNode = f.getExtensionObject(IntegrationEntityTreeNode.class);
        for (IntegrationEntity e : f.getAllChildren()) {
            KongaTreeNode childNode = createNodeForEntity(e);
            folderNode.addChild(childNode);
        }
        return folderNode;
    }
View Full Code Here

    @Override
    public void collapseAll(RootFolder root) {
        if (root == null) {
            getTree().collapseAll();
        } else {
            KongaTreeNode node = getTree().getNodeForEntity(root);
            if (node != null) {
                getTree().collapsePath(getTree().getPath(node));
            }
        }
    }
View Full Code Here

        }
    }

    @Override
    public void expand(RootFolder root) {
        KongaTreeNode node = getTree().getNodeForEntity(root);
        if (node != null) {
            getTree().makeNodeExpanded(node);
        }
    }
View Full Code Here

*/
final class RequiredObjectsTreeModelBuilder {
   
    public KongaTreeModel buildModel(RequiredObjectsTree tree) {
        RequiredObjectsTree.Node root = tree.getRoot();
        KongaTreeNode modelRoot = getNodeFor(root, null);
        buildBranch(root, modelRoot);
        return new DefaultKongaTreeModel(modelRoot);
    }
View Full Code Here

        return node;
    }
   
    private void buildBranch(RequiredObjectsTree.Node root, KongaTreeNode parent) {
        for (RequiredObjectsTree.Node req : root.children()) {
            KongaTreeNode node = getNodeFor(req, parent);
            buildBranch(req, node);
        }
    }
View Full Code Here

        }
    }

    private void insertOperation(Operation op) {
        EntityType connectType = op.getConnectType();
        KongaTreeNode parent = findConnectRoot(connectType);
        if (parent != null) {
            KongaTreeNode opNode = op.getExtensionObject(IntegrationEntityTreeNode.class);
            treeModel.insertNode(opNode, parent);
        }
    }
View Full Code Here

        RootFolder rootFolder = project.getRootFolder(type);
        // Note that we cannot iterate through the model, but must iterate over
        // the nodes directly. This is to ensure that the operation is inserted
        // even if the model has a KongaTreeFilter that filters out the parent
        // (perhaps temporarily).
        KongaTreeNode root = treeModel.getRoot();
        for (KongaTreeNode node : root.breadthFirstEnumeration()) {
            Object nodeObject = node.getUserObject();
            if (nodeObject == rootFolder) {
                return node;
            }
        }
View Full Code Here

            });
        }

        private void removeOperation(Operation op) {
            EntityType connectType = op.getConnectType();
            KongaTreeNode parent = findConnectRoot(connectType);
            if (parent != null) {
                removeOperationNodeFromParent(op, parent);
            }
        }
View Full Code Here

    private void insertScheduleNodesUnderOperations(IntegrationProject project,
                                                    KongaTreeNode operationRoot,
                                                    Multimap<ScheduleId, Operation> scheduleBag) {
        for (Enumeration<KongaTreeNode> en = operationRoot.breadthFirstEnumeration(); en.hasMoreElements(); ) {
            KongaTreeNode node = en.nextElement();
            Object nodeObject = node.getUserObject();
            if (nodeObject instanceof Operation) {
                IntegrationEntityTreeNode opNode = (IntegrationEntityTreeNode) node;
                Operation op = (Operation) nodeObject;
                Schedule schedule = project.getItemLookup().getEntity(op.getScheduleId(), Schedule.class);
                if (schedule != null) {
View Full Code Here

TOP

Related Classes of org.jitterbit.ui.widget.tree.KongaTreeNode

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.