Package javax.swing.tree

Examples of javax.swing.tree.TreeNode.children()


            throws javax.swing.tree.ExpandVetoException {
        TreeNode node = (TreeNode) treeExpansionEvent.getPath().getLastPathComponent();
        if (node instanceof AccessibilityNode) {
            // Calling oneway methods from an UNO thread may cause
            // deadlocks, so adding the listeners here.
            for (java.util.Enumeration e = node.children(); e.hasMoreElements(); ) {
                ((AccessibilityNode) e.nextElement()).setAttached(false);
            }
        }
    }
   
View Full Code Here


  private static void collapseAll(WorkspaceTreeModel model) {
      TreeNode root = (TreeNode) model.getRoot();
      IWorkspaceView view = WorkspaceController.getCurrentModeExtension().getView();
      TreePath rootPath = new TreePath(root);
      for (Enumeration<?> e=root.children(); e.hasMoreElements();) {
        TreeNode n = (TreeNode) e.nextElement();
        TreePath path = rootPath.pathByAddingChild(n);
        collapseAll(view, model, path);
      }
  }
View Full Code Here

    public void treeExpanded(javax.swing.event.TreeExpansionEvent treeExpansionEvent) {
        TreeNode node = (TreeNode) treeExpansionEvent.getPath().getLastPathComponent();
        if (node instanceof AccessibilityNode) {
            // Calling oneway methods from an UNO thread may cause
            // deadlocks, so adding the listeners here.
            for (java.util.Enumeration e = node.children(); e.hasMoreElements(); ) {
                ((AccessibilityNode) e.nextElement()).setAttached(true);
            }
        }
    }
   
View Full Code Here

            throws javax.swing.tree.ExpandVetoException {
        TreeNode node = (TreeNode) treeExpansionEvent.getPath().getLastPathComponent();
        if (node instanceof AccessibilityNode) {
            // Calling oneway methods from an UNO thread may cause
            // deadlocks, so adding the listeners here.
            for (java.util.Enumeration e = node.children(); e.hasMoreElements(); ) {
                ((AccessibilityNode) e.nextElement()).setAttached(false);
            }
        }
    }
   
View Full Code Here

                if (tablePath == null) {
                    return null;
                }

                tableNode = (TreeNode) tablePath.getLastPathComponent();
                enumer    = tableNode.children();

                while (enumer.hasMoreElements()) {
                    Object o = enumer.nextElement();

                    if (o.toString().equals("Indices")) {
View Full Code Here

    private void expandAll(JTree tree, TreePath parent, boolean expand) {
        // Traverse children
        TreeNode node = (TreeNode) parent.getLastPathComponent();
        if (node.getChildCount() >= 0) {
            for (Enumeration e = node.children(); e.hasMoreElements();) {
                TreeNode n = (TreeNode) e.nextElement();
                TreePath path = parent.pathByAddingChild(n);
                expandAll(tree, path, expand);
            }
        }
View Full Code Here

    }
  }

  private void removeSelectionOfGroupUsers(TreePath path) {
    TreeNode treeNode = ((TreeNode) path.getLastPathComponent());
    Enumeration children = treeNode.children();
    while (children.hasMoreElements()) {
      TreeNode node = (TreeNode) children.nextElement();
      myUserTree.removeSelectionPath(TreeUtils.getPathFromRoot(node));
    }
  }
View Full Code Here

      Object userObject = TreeUtils.getUserObject(selectionPath);
      if (userObject instanceof User) {
        result.add((User) userObject);
      } else { // group
        TreeNode treeNode = ((TreeNode) selectionPath.getLastPathComponent());
        Enumeration enumeration = treeNode.children();
        while (enumeration.hasMoreElements()) {
          TreeNode node = (TreeNode) enumeration.nextElement();
          result.add((User) ((DefaultMutableTreeNode) node).getUserObject());
        }
      }
View Full Code Here

    try
    {
      TreeNode node = (TreeNode) parent.getLastPathComponent();
      if (node.getChildCount() >= 0)
      {
        for (Enumeration<?> e = node.children(); e.hasMoreElements();)
        {
          TreeNode n = (TreeNode) e.nextElement();
          TreePath path = parent.pathByAddingChild(n);
          expandAll(tree, path, expand);
        }
View Full Code Here

    try
    {
      TreeNode node = (TreeNode) parent.getLastPathComponent();
      if (node.getChildCount() >= 0)
      {
        for (Enumeration<?> e = node.children(); e.hasMoreElements();)
        {
          TreeNode n = (TreeNode) e.nextElement();
          TreePath path = parent.pathByAddingChild(n);
          expandAll(tree, path, expand);
        }
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.