Examples of expandPath()


Examples of javax.swing.JTree.expandPath()

                        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());
                            }
                        }
                    }
            } else if (actionCommand.equals("Collapse")) {
                    if (tree.getLastSelectedPathComponent() != null) {
View Full Code Here

Examples of javax.swing.JTree.expandPath()

                specifyTreePath = treePath;
           
            if (specifyTreePath == null) {
                boolean expanded = tree.isExpanded(treePath);
                if (!expanded)
                    tree.expandPath(treePath);
                int i = tree.getRowForPath(treePath);
                int j = 1;
                int jj = 1;
                while (j <= treeNode.getChildCount()) {
                    TreePath childTreePath = tree.getPathForRow(i + jj);                 
View Full Code Here

Examples of javax.swing.JTree.expandPath()

    }
   
    private void expand() {
       
            JTree tree = getContainer().getTree();
            tree.expandPath(tree.getLeadSelectionPath());
       
    }
   
    private void collapse() {
       
View Full Code Here

Examples of net.sf.mzmine.desktop.impl.projecttree.ProjectTree.expandPath()

        for (int i = 0; i < childCount; i++) {
          TreeNode node = (TreeNode) treeModel.getChild(
              treeModel.getRoot(), i);
          TreeNode pathToRoot[] = treeModel.getPathToRoot(node);
          TreePath path = new TreePath(pathToRoot);
          projectTree.expandPath(path);
        }
      }
    };
    try {
      if (SwingUtilities.isEventDispatchThread())
View Full Code Here

Examples of net.sourceforge.cruisecontrol.gui.configuration.tree.ConfigTree.expandPath()

   
    // The tree should be empty.
    assertTrue(root.isLeaf());
   
    // Try to expand the node.
    tree.expandPath(new TreePath(root.getPath()));
    assertTrue(root.isLeaf());
  }
 
  public void testUnrecognizedRoot() {
    try {
View Full Code Here

Examples of net.sourceforge.cruisecontrol.gui.configuration.tree.ConfigTree.expandPath()

    assertEquals("bad", child.getName());
    assertTrue(child.getHtmlDocumentation().startsWith("<h2>Error</h2>"));
   
    // Try to expand the child node. This should fail, since the internals of
    // unrecognized nodes are not parsed.
    tree.expandPath(new TreePath(child.getPath()));
    assertTrue(child.isLeaf());
  }
 
  public void testBuildProjects() {
    ConfigTree tree = ConfigTreeUtils.makeTree(
View Full Code Here

Examples of net.sourceforge.cruisecontrol.gui.configuration.tree.ConfigTree.expandPath()

    // Verify that each project node uses the correct schedule node.
    assertEquals(2, root.getChildCount());
    ProjectNode proj1 = (ProjectNode) root.getChildAt(0);
    ProjectNode proj2 = (ProjectNode) root.getChildAt(1);
   
    tree.expandPath(new TreePath(proj1.getPath()));
    assertEquals(1, proj1.getChildCount());
   
    tree.expandPath(new TreePath(proj2.getPath()));
    assertEquals(1, proj2.getChildCount());
   
View Full Code Here

Examples of net.sourceforge.cruisecontrol.gui.configuration.tree.ConfigTree.expandPath()

    ProjectNode proj2 = (ProjectNode) root.getChildAt(1);
   
    tree.expandPath(new TreePath(proj1.getPath()));
    assertEquals(1, proj1.getChildCount());
   
    tree.expandPath(new TreePath(proj2.getPath()));
    assertEquals(1, proj2.getChildCount());
   
    BasicNode schedule1 = (BasicNode) proj1.getChildAt(0);
    BasicNode schedule2 = (BasicNode) proj2.getChildAt(0);
   
View Full Code Here

Examples of org.apache.log4j.lf5.viewer.categoryexplorer.CategoryExplorerTree.expandPath()

      Node n = nodeList.item(i);
      map = n.getAttributes();
      CategoryNode chnode = model.addCategory(new CategoryPath(getValue(map, PATH)));
      chnode.setSelected((getValue(map, SELECTED).equalsIgnoreCase("true")) ? true : false);
      if (getValue(map, EXPANDED).equalsIgnoreCase("true")) ;
      tree.expandPath(model.getTreePathToRoot(chnode));
    }

  }

  protected void processLogLevels(Document doc) {
View Full Code Here

Examples of org.apache.log4j.lf5.viewer.categoryexplorer.CategoryExplorerTree.expandPath()

      Node n = nodeList.item(i);
      map = n.getAttributes();
      CategoryNode chnode = model.addCategory(new CategoryPath(getValue(map, PATH)));
      chnode.setSelected((getValue(map, SELECTED).equalsIgnoreCase("true")) ? true : false);
      if (getValue(map, EXPANDED).equalsIgnoreCase("true")) ;
      tree.expandPath(model.getTreePathToRoot(chnode));
    }

  }

  protected void processLogLevels(Document doc) {
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.