Examples of KongaTreeNode


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

        KongaTreeNode start = getStartForDownwardTraversal();
        return next(start);
    }

    private KongaTreeNode getStartForDownwardTraversal() {
        KongaTreeNode start = currentNode;
        if (start == null) {
            // Use the last selected node.
            int[] selectedRows = tree.getSelectionRows();
            if (selectedRows.length > 0) {
                int lastRow = selectedRows[selectedRows.length - 1];
View Full Code Here

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

        return start;
    }

    @Override
    public T previous() {
        KongaTreeNode start = getStartForUpwardTraversal();
        return previous(start);
    }
View Full Code Here

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

        KongaTreeNode start = getStartForUpwardTraversal();
        return previous(start);
    }

    private KongaTreeNode getStartForUpwardTraversal() {
        KongaTreeNode start = currentNode;
        if (start == null) {
            // Use the first selected node.
            int[] selectedRows = tree.getSelectionRows();
            if (selectedRows.length > 0) {
                int lastRow = selectedRows[0];
View Full Code Here

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

    private T previous(KongaTreeNode start) {
        if (start == null) {
            return null;
        }
        KongaTreeNode previous = (KongaTreeNode) TreeUtils.getNextNodeUp(tree.getModel(), start);
        while (previous != null) {
            if (itemFinder.apply(previous)) {
                return storeAndReturnItem(previous);
            }
            previous = (KongaTreeNode) TreeUtils.getNextNodeUp(tree.getModel(), previous);
View Full Code Here

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

    @Override
    public boolean isBefore(T before, T after) {
        if (root == null) {
            return false;
        }
        KongaTreeNode start = (KongaTreeNode) BreadthFirstSearcher.findFirst(
                        tree.getModel(), root, new NodeFinder(after));
        if (start == null) {
            return false;
        }
        Predicate<Object> finder = new NodeFinder(before);
View Full Code Here

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

        }

        @Override
        public boolean apply(Object o) {
            if (o instanceof KongaTreeNode) {
                KongaTreeNode node = (KongaTreeNode) o;
                if (node.getUserObject() instanceof RootFolder) {
                    RootFolder root = (RootFolder) node.getUserObject();
                    if (root.getItemType() == type) {
                        return true;
                    }
                }
            }
View Full Code Here

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

                }
            });
        }

        private void createModel() {
            KongaTreeNode root = new DefaultKongaTreeNode("Recent Projects", true);
            model = new DefaultKongaTreeModel(root);
            Collections.sort(projectNodes, ProjectNodeComparator.LAST_ACCESSED_ORDER);
            for (ProjectNode node : projectNodes) {
                model.insertNode(node, root);
            }
View Full Code Here

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

    private KongaTree createTree() {
        KongaTree tree = new KongaTree(model);
        tree.setRootVisible(false);
        tree.setShowsRootHandles(true);
        tree.setCellRenderer(renderer);
        KongaTreeNode current = model.getRoot().getChildAt(0);
        tree.makeNodeExpanded(current);
        tree.asSelectionSource().setNodeObjectConverter(new UserObjectNodeObjectConverter(File.class));
        return tree;
    }
View Full Code Here

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

            node.setSelectedKeys(Arrays.asList(pk.getPrimaryKeys()));
        }
    }

    private void createNodes(DatabaseObject[] objects) {
        KongaTreeNode root = getRoot();
        for (DatabaseObject o : objects) {
            TableNode node = new TableNode(root, o);
            tableNodes.put(o, node);
        }
    }
View Full Code Here

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

            tableNodes.put(o, node);
        }
    }

    private void createNodes(PrimaryKeys[] pks) {
        KongaTreeNode root = getRoot();
        for (PrimaryKeys pk : pks) {
            TableNode node = new TableNode(root, pk);
            tableNodes.put(pk.getDatabaseObject(), node);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.