/** Process a structural change event from the user-supplied tree model. * This will result in a generic "something changed" * TableModelEvent being fired. */ public void treeStructureChanged(TreeModelEvent e) { assert SwingUtilities.isEventDispatchThread(); getLayout().treeStructureChanged(e); fireTreeChange (translateEvent(e), STRUCTURE_CHANGED); //If it's a structural change, we need to dump all our info about the //existing tree structure - it can be bogus now. Similar to JTree, //this will have the effect of collapsing all expanded paths. The //TreePathSupport takes care of dumping the layout cache's copy of //such data getTreePathSupport().clear(); //We will just fire a "Something happened. Go figure out what." event. fireTableChange (new TableModelEvent (getModel())); }