Package org.jitterbit.integration.uidelegate.entity.tree

Examples of org.jitterbit.integration.uidelegate.entity.tree.IntegrationEntityTreeNode


                                                      boolean leaf,
                                                      int row,
                                                      boolean hasFocus) {
            super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
            if (value instanceof IntegrationEntityTreeNode) {
                IntegrationEntityTreeNode node = (IntegrationEntityTreeNode) value;
                if (node.getUserObject().getEntityType() != EntityType.Folder) {
                    setIcon(node.getDefaultIcon());
                }
                setToolTipText(ToolTipStringFactory.getToolTip(node.getUserObject()));
            } else {
                setToolTipText(null);
            }
            return this;
        }
View Full Code Here


    private Map<IntegrationEntity, IntegrationEntityTreeNode> buildNodeMap() {
        Map<IntegrationEntity, IntegrationEntityTreeNode> nodeMap = Maps.newIdentityHashMap();
        for (Enumeration<KongaTreeNode> en = getRoot().breadthFirstEnumeration(); en.hasMoreElements();) {
            KongaTreeNode node = en.nextElement();
            if (node instanceof IntegrationEntityTreeNode) {
                IntegrationEntityTreeNode node2 = (IntegrationEntityTreeNode) node;
                nodeMap.put(node2.getUserObject(), node2);
            }
        }
        return nodeMap;
    }
View Full Code Here

   
    private void process(IntegrationEntity e) {
        if (!processed.add(e)) {
            return;
        }
        IntegrationEntityTreeNode node = createNode(e);
        if (e instanceof IntegrationProject) {
            if (projectNode != null) {
                throw new RuntimeException("Multiple projects");
            }
            projectNode = node;
View Full Code Here

    }
   
    private void processParents(IntegrationEntity e, IntegrationEntityTreeNode node) {
        IntegrationEntity parent = e.getParent();
        while (parent != null) {
            IntegrationEntityTreeNode parentNode = getParentNode(parent);
            if (node.getParent() != parentNode) {
                parentNode.addChild(node);
            }
            if (parent instanceof IntegrationProject) {
                break;
            }
            parent = parent.getParent();
View Full Code Here

            } else {
                throw new RuntimeException("Multiple projects");
            }
        } else {
            assert parent instanceof Folder;
            IntegrationEntityTreeNode node = folderNodes.get(parent);
            if (node == null) {
                node = createNode(parent);
                folderNodes.put(parent, node);
            }
            return node;
View Full Code Here

     */
    public List<IntegrationEntityTreeNode> insertIntegrationEntities(List<IntegrationEntity> items) {
        List<IntegrationEntityTreeNode> inserted = Lists.newArrayList();
        for (IntegrationEntity e : items) {
            if (isOfInterest(e)) {
                IntegrationEntityTreeNode node = nodeCreator.createNode(e);
                IntegrationEntityTreeNode parent = nodeCreator.getParentNode();
                if (parent != null) {
                    super.insertNode(node, parent);
                    inserted.add(node);
                }
            }
View Full Code Here

    public boolean moveIntegrationEntities(List<IntegrationEntity> items) {
        boolean changed = false;
        Map<IntegrationEntity, IntegrationEntityTreeNode> nodeMap = buildNodeMap();
        for (IntegrationEntity entity : items) {
            IntegrationEntityTreeNode node = nodeMap.get(entity);
            if (node != null) {
                KongaTreeNode currentParent = node.getParent();
                if (currentParent instanceof IntegrationEntityTreeNode) {
                    if (((IntegrationEntityTreeNode) currentParent).getUserObject() != entity.getParent()) {
                        node.removeFromParent();
                        IntegrationEntityTreeNode newParent = nodeMap.get(entity.getParent());
                        if (newParent != null) {
                            newParent.add(node);
                        }
                        changed = true;
                    }
                }
            }
View Full Code Here

        }
    }

    private static void createSubNodes(IntegrationEntityTreeNode parentNode) {
        for (IntegrationEntity child : parentNode.getUserObject().getAllChildren()) {
            IntegrationEntityTreeNode childNode = child.getExtensionObject(IntegrationEntityTreeNode.class);
            if (childNode == null) {
                logMissingExtension(child);
                return;
            }
            parentNode.addChild(childNode);
View Full Code Here

   
    private DefaultKongaTreeModel createTreeModel(KList<WebServiceCall> conflicted) {
        conflicted.sort(BY_NAME);
        DefaultKongaTreeNode root = new DefaultKongaTreeNode("Conflicts", true);
        for (WebServiceCall wsCall : conflicted) {
            IntegrationEntityTreeNode wsNode = new IntegrationEntityTreeNode(root, wsCall, true);
            addOperationInfoNodes(wsNode, wsCall.getOperationInfo());
        }
        return new DefaultKongaTreeModel(root);
    }
View Full Code Here

     *            null.
     * @return an <code>IntegrationEntityTreeNode</code> representing the specified entity
     */
    public IntegrationEntityTreeNode createNode(IntegrationEntity entity) {
        parentNode = findParentNode(entity);
        IntegrationEntityTreeNode node = entity.getExtensionObject(IntegrationEntityTreeNode.class);
        if (node == null) {
            throw new RuntimeException("I do not know how to create tree nodes for items of type " +
                            entity.getEntityType().getDisplayName() + ". This is a bug.");
        }
        return node;
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.uidelegate.entity.tree.IntegrationEntityTreeNode

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.