/** * Writes the contents of this node into <code>tree</code>. * @param tree the tree to write into * @return the key of the node */ public SplitDockTree<D>.Key put( SplitDockTree<D> tree ){ if( dockables != null || childA == null || childB == null ){ return tree.put( dockables, selected, placeholders, placeholderMap, -1 ); } else if( horizontal ){ return tree.horizontal( childA.put( tree ), childB.put( tree ), divider, placeholders, placeholderMap, -1 ); } else{ return tree.vertical( childA.put( tree ), childB.put( tree ), divider, placeholders, placeholderMap, -1 ); } }
/** * Writes the contents of this node into <code>tree</code>. * @param tree the tree to write into * @return the key of the node */ public SplitDockTree<D>.Key put( SplitDockTree<D> tree ){ if( dockables != null || childA == null || childB == null ){ return tree.put( dockables, selected, placeholders, placeholderMap, -1 ); } else if( horizontal ){ return tree.horizontal( childA.put( tree ), childB.put( tree ), divider, placeholders, placeholderMap, -1 ); } else{ return tree.vertical( childA.put( tree ), childB.put( tree ), divider, placeholders, placeholderMap, -1 ); } }
/** * Fills the contents of this grid into <code>tree</code>. * @param tree the tree to fill */ protected void fillTree( SplitDockTree<D> tree ){ Node<D> root = tree(); if( root != null ){ SplitDockTree<D>.Key key = root.put( tree ); tree.root( key ); } }
/** * Fills the contents of this grid into <code>tree</code>. * @param tree the tree to fill */ protected void fillTree( SplitDockTree<D> tree ){ Node<D> root = tree(); if( root != null ){ SplitDockTree<D>.Key key = root.put( tree ); tree.root( key ); } }