Examples of expandPath()


Examples of javax.swing.JTree.expandPath()

                    model.insertNodeInto(pChild, pParent, index);
                    // TF:21/9/07:Re-ordered this so new nodes inserted into an existing tree would be opened/closed properly
                    if (!tree.isRootVisible() || !tree.getShowsRootHandles()) {
                        TreePath path = new TreePath(pChild);
                        if (pChild.isOpened()) {
                            tree.expandPath(path);
                        }
                        else {
                            tree.collapsePath(path);
                        }
                    }
View Full Code Here

Examples of javax.swing.JTree.expandPath()

                            tree = ((OutlineField)root).getTree();
                        }
                        if (tree != null) {
                            TreePath path = new TreePath(DisplayNode.this.getPath());
                            if (value) {
                                tree.expandPath(path);
                                tree.scrollPathToVisible(path);
                            }
                            else {
                                tree.collapsePath(path);
                            }
View Full Code Here

Examples of javax.swing.JTree.expandPath()

                            tree = ((OutlineField)root).getTree();
                        }
                        if (tree != null) {
                            TreePath path = new TreePath(DisplayNode.this.getPath());
                            if (value) {
                                tree.expandPath(path);
                                tree.scrollPathToVisible(path);
                            }
                            else {
                                tree.collapsePath(path);
                            }
View Full Code Here

Examples of javax.swing.JTree.expandPath()

                    model.insertNodeInto(pChild, pParent, index);
                    // TF:21/9/07:Re-ordered this so new nodes inserted into an existing tree would be opened/closed properly
                    if (!tree.isRootVisible() || !tree.getShowsRootHandles()) {
                        TreePath path = new TreePath(pChild);
                        if (pChild.isOpened()) {
                            tree.expandPath(path);
                        }
                        else {
                            tree.collapsePath(path);
                        }
                    }
View Full Code Here

Examples of javax.swing.JTree.expandPath()

                    model.insertNodeInto(pChild, pParent, index);
                    // TF:21/9/07:Re-ordered this so new nodes inserted into an existing tree would be opened/closed properly
                    if (!tree.isRootVisible() || !tree.getShowsRootHandles()) {
                        TreePath path = new TreePath(pChild);
                        if (pChild.isOpened()) {
                            tree.expandPath(path);
                        }
                        else {
                            tree.collapsePath(path);
                        }
                    }
View Full Code Here

Examples of javax.swing.JTree.expandPath()

     * @param selected JMeterTreeNode tree node to expand
     */
    protected void expandToSelectNode(JMeterTreeNode selected) {
        GuiPackage guiInstance = GuiPackage.getInstance();
        JTree jTree = guiInstance.getMainFrame().getTree();
        jTree.expandPath(new TreePath(selected.getPath()));
        selected.setMarkedBySearch(true);
    }
}
View Full Code Here

Examples of javax.swing.JTree.expandPath()

       
        for (Iterator<JMeterTreeNode> iterator = nodes.iterator(); iterator.hasNext();) {
            JMeterTreeNode jMeterTreeNode = iterator.next();
            jMeterTreeNode.setMarkedBySearch(true);
            if (expand) {
                jTree.expandPath(new TreePath(jMeterTreeNode.getPath()));
            }
        }
        GuiPackage.getInstance().getMainFrame().repaint();
        searchTF.requestFocusInWindow();
        this.setVisible(false);
View Full Code Here

Examples of javax.swing.JTree.expandPath()

            // Finally, restore selection paths.
            for (int index = 0; index < node.getChildCount(); index++) {
                MCTMutableTreeNode childNode = (MCTMutableTreeNode) node.getChildAt(index);
                View childView = (View) childNode.getUserObject();
                if (expanded.contains(childView.getManifestedComponent().getComponentId())) {
                    parentTree.expandPath(childNode.getTreePath());
                    childNode.setProxy(false); // If expanded node is mislabeled as proxy, it will lose updates
                }
            }

            treeModel.nodeChanged(node);
View Full Code Here

Examples of javax.swing.JTree.expandPath()

    public void setSelectedNode(MCTMutableTreeNode newSelectedNode) {
        JTree activeTree = getActiveTree();
        DefaultTreeModel treeModel = (DefaultTreeModel) activeTree.getModel();
        TreePath path = new TreePath(treeModel.getPathToRoot(newSelectedNode));
        if (path != null) { // take no action because the newSelectedNode is not in the tree.
            activeTree.expandPath(path);
            activeTree.setSelectionPath(path);    
        }
    }

    /**
 
View Full Code Here

Examples of javax.swing.JTree.expandPath()

                    if (tree.getLastSelectedPathComponent() != null) {
                        DefaultMutableTreeNode node = (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
                        if (node.getUserObject() instanceof ObjectInfo) {
                            ObjectInfo oj = (ObjectInfo)node.getUserObject();
                            if ( (oj.flag.equals("object")) || (oj.flag.equals("favorites")) || (oj.flag.equals("book")) || (oj.flag.equals("bookSettings")) )
                                tree.expandPath(tree.getSelectionPath());
                            else if (oj.flag.equals("layout")) {
                                tree.expandPath(tree.getSelectionPath().getParentPath());
                            }
                        }
                    }
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.