public boolean isParamPanelOrChildSelected ( String panelName ) { DefaultMutableTreeNode node = getTreeNodeFromPanelName ( panelName ) ; if ( node != null ) { TreePath panelPath = new TreePath ( node . getPath ( ) ) ; if ( getTreeParam ( ) . isPathSelected ( panelPath ) ) { return true ; } TreePath selectedPath = getTreeParam ( ) . getSelectionPath ( ) ; return selectedPath != null && panelPath . equals ( selectedPath . getParentPath ( ) ) ; } return false ; }
Tells whether or not the given param panel or one of its child panels is selected .