public boolean isVisible(TreePath path) { if(path != null) { TreePath parentPath = path.getParentPath(); if(parentPath != null) { return isExpanded(parentPath); } // Root. return true; } return false; }
/** * Returns true if the node identified by the path is currently expanded, * * @param path the <code>TreePath</code> specifying the node to check * @return false if any of the nodes in the node's path are collapsed, * true if all nodes in the path are expanded */ public boolean isExpanded(TreePath path) { if(path == null) return false; // Is this node expanded? Object value = expandedPaths.get(path); if(value == null || !((Boolean)value).booleanValue()) return false; // It is, make sure its parent is also expanded. TreePath parentPath = path.getParentPath(); if(parentPath != null) return isExpanded(parentPath); return true; }
public TreePath[] getExpandedDescendants(TreePath parent) { TreePath[] result = new TreePath[0]; if(isExpanded(parent)) { TreePath path; Boolean value;
public boolean isExpanded (TreePath path) { if( !isRootVisible() && null == path.getParentPath() ) return true; return getTreePathSupport().isExpanded(path); }
if (getTreePathSupport().isExpanded(childPath)) {