Java JTree Path isFile(TreePath path)

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

Description

is File

License

Open Source License

Declaration

public static boolean isFile(TreePath path) 

Method Source Code


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

import javax.swing.tree.DefaultMutableTreeNode;

import javax.swing.tree.TreePath;

public class Main {
    public static boolean isFile(TreePath path) {
        DefaultMutableTreeNode clickedNode = (DefaultMutableTreeNode) path.getLastPathComponent();
        return (!clickedNode.getAllowsChildren());
    }/*w  ww  . java 2  s .c  om*/
}

Related

  1. getUpdatedTreePath(TreePath[] paths, JTree tree)
  2. getUserObject(TreePath path)
  3. getUserObject(TreePath path)
  4. isDescendant(TreePath path1, final TreePath path2)
  5. isDescendant(TreePath path1, final TreePath path2)
  6. isSource(TreePath path)
  7. isTreePathContainedInExpansionState(TreePath treePath, ArrayList expansionStateStrings)
  8. lastPathComponents(TreePath[] paths)
  9. loadExpansionState(JTree tree, Enumeration expansionState)