Here you can find the source of isSource(TreePath path)
public static boolean isSource(TreePath path)
//package com.java2s; //License from project: Open Source License import javax.swing.tree.TreePath; public class Main { public static boolean isSource(TreePath path) { int pathCount = path.getPathCount(); return (pathCount == 2); }/*from www . j ava 2 s . c o m*/ }