Java JTree Path treeStringFromTreePath(TreePath path)

Here you can find the source of treeStringFromTreePath(TreePath path)

Description

tree String From Tree Path

License

Open Source License

Declaration

public static String treeStringFromTreePath(TreePath path) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import javax.swing.tree.TreePath;

public class Main {
    public static String treeStringFromTreePath(TreePath path) {
        StringBuilder db_path = new StringBuilder("BaseX Server");
        for (int i = 1; i < path.getPathCount(); i++) {
            db_path.append("/").append(path.getPathComponent(i).toString());
        }// w w  w.j a  va  2 s.c o  m
        return db_path.toString();
    }
}

Related

  1. resourceFromTreePath(TreePath path)
  2. restoreSelectionPath(JTree parentTree)
  3. searchForNodeV2(TreeNode node, String query, JTree tree, TreePath actualPath, boolean isRoot)
  4. selectCategoryTreePath(JTree tree, TreePath treePath)
  5. setTreeState(@Nonnull final JTree tree, @Nonnull final TreePath path, final boolean recursively, final boolean unfold)