Examples of TreeNode


Examples of javax.swing.tree.TreeNode

            if (path == null)
                return;

            final PomManager pomMgr = PomManager.getInstance(project);

            final TreeNode node = (TreeNode) path.getLastPathComponent();
            if (!(node instanceof GoalNode))
                return;

            final VirtualFile pomFile;
            final PomNode pomNode = model.getPomNode(node);
View Full Code Here

Examples of javax.swing.tree.TreeNode

            final TreePath selection = tree.getSelectionPath();
            if (selection == null)
                return;

            final TreeNode node = (TreeNode) selection.getLastPathComponent();
            if (node instanceof PluginNode)
                navigateToSource((PluginNode) node);
            else if (node instanceof GoalNode)
                navigateToSource((GoalNode) node);
            else if (node instanceof PomNode)
View Full Code Here

Examples of javax.swing.tree.TreeNode

        }
    }

    private class PomTreeExpander implements TreeExpander {
        private boolean hasExpandedProjects() {
            final TreeNode projectsNode = model.getProjectsNode();
            //noinspection unchecked
            final Enumeration<TreeNode> projectNodes = projectsNode.children();
            while (projectNodes.hasMoreElements()) {
                final TreeNode node = projectNodes.nextElement();
                if (tree.isExpanded(new TreePath(model.getPathToRoot(node))))
                    return true;
            }

            return false;
View Full Code Here

Examples of javax.swing.tree.TreeNode

            return false;
        }

        private boolean isPluginsNodeExpanded() {
            final TreeNode pluginsNode = model.getPluginsNode();
            return tree.isExpanded(new TreePath(model.getPathToRoot(pluginsNode)));
        }
View Full Code Here

Examples of javax.swing.tree.TreeNode

        public boolean canExpand() {
            return !hasExpandedProjects() || !isPluginsNodeExpanded();
        }

        public void collapseAll() {
            final TreeNode projectsNode = model.getProjectsNode();
            //noinspection unchecked
            final Enumeration<TreeNode> projectNodes = projectsNode.children();
            while (projectNodes.hasMoreElements()) {
                final TreeNode node = projectNodes.nextElement();
                tree.collapsePath(new TreePath(model.getPathToRoot(node)));
            }

            final TreeNode pluginsNode = model.getPluginsNode();
            tree.collapsePath(new TreePath(model.getPathToRoot(pluginsNode)));
        }
View Full Code Here

Examples of javax.swing.tree.TreeNode

            final TreeNode pluginsNode = model.getPluginsNode();
            tree.collapsePath(new TreePath(model.getPathToRoot(pluginsNode)));
        }

        public void expandAll() {
            final TreeNode pluginsNode = model.getPluginsNode();
            tree.expandPath(new TreePath(model.getPathToRoot(pluginsNode)));

            final TreeNode projectsNode = model.getProjectsNode();
            //noinspection unchecked
            final Enumeration<TreeNode> projectNodes = projectsNode.children();
            while (projectNodes.hasMoreElements()) {
                final TreeNode node = projectNodes.nextElement();
                tree.expandPath(new TreePath(model.getPathToRoot(node)));
            }
        }
View Full Code Here

Examples of javax.swing.tree.TreeNode

                        DefaultMutableTreeNode source = (DefaultMutableTreeNode) pathSource
                                .getLastPathComponent();

                        TreePath pathNewChild = null;

                        TreeNode sourceFather = source.getParent();
                        int index = sourceFather.getIndex(source);
                        source.removeFromParent();

                        treeModel.nodesWereRemoved(sourceFather,
                                new int[] { index }, new Object[] { source });
View Full Code Here

Examples of javax.swing.tree.TreeNode

            hiddenTask.add(new HiddenTask(t[i], parent, parent.getIndex(t[i])));
        }

        for (int i = 0; i < hiddenTask.size(); i++) {
            HiddenTask ht = (HiddenTask) hiddenTask.get(i);
            TreeNode parent = ht.node.getParent();
            if (parent != null)
                ((GanttTreeTableModel) getTreeTable().getTreeTableModel())
                        .removeNodeFromParent(((HiddenTask) hiddenTask.get(i))
                                .getNode());
        }
View Full Code Here

Examples of javax.swing.tree.TreeNode

                                    .getUserObject()).setProjectTask(false);
                        /*
                         * this will add new custom columns to the newly
                         * created task.
                         */
                        TreeNode sel = getSelectedTaskNode();
                        TreeNode parent = null;
                        if (sel != null) {
                            parent = sel.getParent();
                            if (parent != null)
                                where = parent.getIndex(sel);
                        }
                        tasksList.add((Task) insertClonedNode(
                                current == rootNode ? current
                                        : (DefaultMutableTreeNode) current
                                                .getParent(),
View Full Code Here

Examples of javax.swing.tree.TreeNode

  public void resourceChanged(ProjectResource resource) {
    ResourceNode node = getNodeForResource(resource);
    if (node==null) {
      return;
    }
    TreeNode parent = node.getParent();
    int index = parent.getIndex(node);
    assert index>=0;
    nodesChanged(parent, new int[] {index});
  }
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.