/** * Removes all children from this station and then adds the contents * that are stored in <code>tree</code>. Calling this method is equivalent * to <code>dropTree( tree, true );</code> * @param tree the new set of children * @throws SplitDropTreeException If the tree is not acceptable. */ public void dropTree( SplitDockTree<Dockable> tree ){ dropTree(tree, true); }
/** * Removes all children from this station and then adds the contents * that are stored in <code>tree</code>. Calling this method is equivalent * to <code>dropTree( tree, true );</code> * @param tree the new set of children * @throws SplitDropTreeException If the tree is not acceptable. */ public void dropTree( SplitDockTree<Dockable> tree ){ dropTree(tree, true); }
@Override protected void dropTree( SplitDockStation station, SplitDockTree<Dockable> tree ){ station.dropTree( tree ); }
@Override protected void dropTree( SplitDockStation station, SplitDockTree<Dockable> tree ){ station.dropTree( tree ); }
/** * Copies the layout of <code>grid</code>. Any changes to <code>grid</code> * afterwards will not affect this station, nor will changes on this station * affect <code>grid</code>. * @param grid the layout to drop, not <code>null</code> * @see #dropTree(SplitDockTree) */ public void dropGrid( SplitDockGrid grid ){ dropTree( grid.toTree() ); }
/** * Copies the layout of <code>grid</code>. Any changes to <code>grid</code> * afterwards will not affect this station, nor will changes on this station * affect <code>grid</code>. * @param grid the layout to drop, not <code>null</code> * @see #dropTree(SplitDockTree) */ public void dropGrid( SplitDockGrid grid ){ dropTree( grid.toTree() ); }
/** * Exchanges all the {@link CDockable}s on the center panel by * the elements of <code>grid</code>. * @param grid a grid containing some new {@link Dockable}s */ public void deploy( CGrid grid ){ getCenter().dropTree( grid.toTree() ); }
/** * Exchanges all the {@link CDockable}s on the center panel by * the elements of <code>grid</code>. * @param grid a grid containing some new {@link Dockable}s */ public void deploy( CGrid grid ){ getCenter().dropTree( grid.toTree() ); }
/** * Ensures that <code>dockable</code> is a child of this * station. * @param dockable the element to drop, must not yet be a child of this station * @throws IllegalStateException if <code>dockable</code> already * is a child of this station. */ public void dropAside( Dockable dockable ){ if( dockable.getDockParent() == station.getStation() ) throw new IllegalStateException( "dockable already a child" ); DockableSplitDockTree tree = getStation().createTree(); if( tree.getRoot() == null ) tree.root( dockable ); else{ tree.root( tree.horizontal( tree.put( dockable ), tree.unroot() ) ); } getStation().dropTree( tree, false ); }
/** * Ensures that <code>dockable</code> is a child of this * station. * @param dockable the element to drop, must not yet be a child of this station * @throws IllegalStateException if <code>dockable</code> already * is a child of this station. */ public void dropAside( Dockable dockable ){ if( dockable.getDockParent() == station.getStation() ) throw new IllegalStateException( "dockable already a child" ); DockableSplitDockTree tree = getStation().createTree(); if( tree.getRoot() == null ) tree.root( dockable ); else{ tree.root( tree.horizontal( tree.put( dockable ), tree.unroot() ) ); } getStation().dropTree( tree, false ); }
public void setLayout( SplitDockStation station, SplitDockStationLayout layout, Map<Integer, Dockable> children, PlaceholderStrategy placeholders ) { DockableSplitDockTree tree = new DockableSplitDockTree(); DockableSplitDockTree.Key root = null; if( layout.getRoot() != null ){ root = handleEntry( layout.getRoot(), tree, children ); } if( root != null ){ tree.root( root ); } station.dropTree( tree, false ); PlaceholderStrategy oldStrategy = station.getPlaceholderStrategy().getStrategy(); if( placeholders != oldStrategy && placeholders != null ){ try{ station.setPlaceholderStrategy( placeholders ); } finally{ station.setPlaceholderStrategy( oldStrategy ); } } Dockable fullscreen = children.get( layout.getFullscreen() ); station.setFullScreen( fullscreen ); }