private void addSubtreeToCheckingStateTracking ( DefaultMutableTreeNode node ) { TreeNode [ ] path = node . getPath ( ) ; TreePath tp = new TreePath ( path ) ; CheckedNode cn = new CheckedNode ( false , node . getChildCount ( ) > 0 , false ) ; nodesCheckingState . put ( tp , cn ) ; for ( int i = 0 ; i < node . getChildCount ( ) ; i ++ ) { addSubtreeToCheckingStateTracking ( ( DefaultMutableTreeNode ) tp . pathByAddingChild ( node . getChildAt ( i ) ) . getLastPathComponent ( ) ) ; } }
Creating data structure of the current model for the checking mechanism