public void synchronize ( DefaultTreeModel treeModel , Tree < E > tree ) throws IOException , SQLException { assert SwingUtilities . isEventDispatchThread ( ) : ApplicationResources . accessor . getMessage ( "assert.notRunningInSwingEventThread" ) ; synchronize ( treeModel , tree . getRootNodes ( ) ) ; }
Synchronizes the children of this node with the roots of the provided tree while adding and removing only a minimum number of nodes . Comparisons are performed using equals on the value objects . This must be called from the Swing event dispatch thread .