Java JTree Node getMutableTreeNodes(TreeNode[] path)

Here you can find the source of getMutableTreeNodes(TreeNode[] path)

Description

get Mutable Tree Nodes

License

Apache License

Declaration

private static DefaultMutableTreeNode[] getMutableTreeNodes(TreeNode[] path) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.TreeNode;

public class Main {
    private static DefaultMutableTreeNode[] getMutableTreeNodes(TreeNode[] path) {
        if (path == null)
            return null;
        DefaultMutableTreeNode[] nodes = new DefaultMutableTreeNode[path.length];
        for (int i = 0; path != null && i < path.length; i++) {
            nodes[i] = (DefaultMutableTreeNode) path[i];
        }/*from w  ww  .  j  av  a2  s.co  m*/
        return nodes;
    }
}

Related

  1. findTreeNodeWithXmlPath(DefaultMutableTreeNode treeNode, String nodeXmlPath)
  2. getAllChildCount(TreeNode node)
  3. getAllTreeNodes(TreeModel model, int startLevel, Class clazz, DefaultMutableTreeNode root)
  4. getAllUserObject(TreeNode node, Set userObjectSet)
  5. getLevel(TreeNode treeNode)
  6. getNodeAt(final JTree tree, final int x, final int y)
  7. getNodeForEvent(JTree targetTree, DropTargetDragEvent dtde)
  8. getPathStringForNode(DefaultMutableTreeNode node)
  9. getSubTree(TreeNode root, String name)