Examples of TreePath


Examples of javax.swing.tree.TreePath

    {
    }

    public void valueChanged(TreeSelectionEvent e)
    {
      final TreePath treePath = e.getNewLeadSelectionPath();
      if (treePath == null)
      {
        setSelectedHandler(null);
      }
      else
      {
        final Object o = treePath.getLastPathComponent();
        if (o instanceof DemoHandlerTreeNode)
        {
          DemoHandlerTreeNode handlerNode = (DemoHandlerTreeNode) o;
          DemoHandler handler = handlerNode.getHandler();
          setSelectedHandler(handler);
View Full Code Here

Examples of javax.swing.tree.TreePath

                if (node != null) {
                    if (Debug.debugging("symbology")) {
                        Debug.output("SymbolChooser: Found node for " + text);
                    }
                    sth.getTree()
                            .setSelectionPath(new TreePath(node.getPath()));
                    sth.updateOptionsForCode(text);
                    setSelectedTreeHolder(sth);
                }
            }
        }
View Full Code Here

Examples of javax.swing.tree.TreePath

            }
        }
    }

    private void expandNode(TreeNode node) {
        tree.expandPath(new TreePath(node));
    }
View Full Code Here

Examples of javax.swing.tree.TreePath

        int row = tree.getRowForLocation(point.x, point.y);
        if (row == -1) {
            return null;
        }

        TreePath path = tree.getPathForLocation(point.x, point.y);
        if (path == null) {
            return null;
        }
        return (TaskTreeBaseNode) path.getLastPathComponent();
    }
View Full Code Here

Examples of javax.swing.tree.TreePath

    /**
     * @return the first selected node or null if nothing is selected.
     */
    public TaskTreeBaseNode getFirstSelectedNode() {
        TreePath path = tree.getSelectionPath();
        if (path == null) {
            return null;
        }

        return (TaskTreeBaseNode) path.getLastPathComponent();
    }
View Full Code Here

Examples of javax.swing.tree.TreePath

        }

        List<TaskTreeBaseNode> nodes = new ArrayList<TaskTreeBaseNode>();

        for (int index = 0; index < treePaths.length; index++) {
            TreePath treePath = treePaths[index];
            nodes.add((TaskTreeBaseNode) treePath.getLastPathComponent());
        }

        return nodes;
    }
View Full Code Here

Examples of javax.swing.tree.TreePath

        if (treePaths == null) {
            return false;
        }

        for (int index = 0; index < treePaths.length; index++) {
            TreePath treePath = treePaths[index];

            Object o = treePath.getLastPathComponent();
            if (o instanceof ProjectTreeNode) {
                return true;
            }
        }
View Full Code Here

Examples of javax.swing.tree.TreePath

        if (treePaths == null) {
            return false;
        }

        for (int index = 0; index < treePaths.length; index++) {
            TreePath treePath = treePaths[index];

            Object o = treePath.getLastPathComponent();
            if (o instanceof TaskTreeNode) {
                return true;
            }
        }
View Full Code Here

Examples of javax.swing.tree.TreePath

        }

        List<TaskView> tasks = new ArrayList<TaskView>();

        for (int index = 0; index < treePaths.length; index++) {
            TreePath treePath = treePaths[index];

            Object o = treePath.getLastPathComponent();
            if (o instanceof TaskTreeNode) {
                tasks.add(((TaskTreeNode) o).task);
            }
        }
View Full Code Here

Examples of javax.swing.tree.TreePath

        if (treePaths == null) {
            return multipleSelection;
        }

        for (int index = 0; index < treePaths.length; index++) {
            TreePath treePath = treePaths[index];

            Object o = treePath.getLastPathComponent();
            if (o instanceof TaskTreeNode) {
                multipleSelection.tasks.add(((TaskTreeNode) o).getTask());
            } else if (o instanceof ProjectTreeNode) {
                multipleSelection.projects.add(((ProjectTreeNode) o).getProject());
            }
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.