/** * 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 ); }