@Override protected SplitDockTree<Dockable> createTree(){ return new DockableSplitDockTree(); }
/** * 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 ); }
/** * Exchanges all the {@link CDockable}s on this area with the * elements of <code>grid</code>. This method also calls * {@link CDockable#setWorkingArea(CStation)} for each * dockable in <code>grid</code>. * @param grid a grid containing some new {@link Dockable}s */ public void deploy( CGrid grid ){ DockableSplitDockTree tree = grid.toTree(); for( Dockable dockable : tree.getDockables() ){ if( dockable instanceof CommonDockable ){ CommonDockable cdock = (CommonDockable)dockable; cdock.getDockable().setWorkingArea( this ); } } getStation().dropTree( tree ); }
/** * 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 ); }
/** * Exchanges all the {@link CDockable}s on this area with the * elements of <code>grid</code>. This method also calls * {@link CDockable#setWorkingArea(CStation)} for each * dockable in <code>grid</code>. * @param grid a grid containing some new {@link Dockable}s */ public void deploy( CGrid grid ){ DockableSplitDockTree tree = grid.toTree(); for( Dockable dockable : tree.getDockables() ){ if( dockable instanceof CommonDockable ){ CommonDockable cdock = (CommonDockable)dockable; cdock.getDockable().setWorkingArea( this ); } } getStation().dropTree( tree ); }
@Override protected SplitDockTree<Dockable> createTree(){ return new DockableSplitDockTree(); }
/** * Converts the current grid into a tree. * @return the tree which represents this grid * @see SplitDockStation#dropTree(SplitDockTree) */ public DockableSplitDockTree toTree(){ DockableSplitDockTree tree = new DockableSplitDockTree(); fillTree( tree ); return tree; } }
/** * Converts the current grid into a tree. * @return the tree which represents this grid * @see SplitDockStation#dropTree(SplitDockTree) */ public DockableSplitDockTree toTree(){ DockableSplitDockTree tree = new DockableSplitDockTree(); fillTree( tree ); return tree; } }
/** * Gets the contents of this station as a {@link SplitDockTree}. * @return the tree */ public DockableSplitDockTree createTree(){ DockableSplitDockTree tree = new DockableSplitDockTree(); createTree(new SplitDockTreeFactory(tree)); return tree; }
/** * Gets the contents of this station as a {@link SplitDockTree}. * @return the tree */ public DockableSplitDockTree createTree(){ DockableSplitDockTree tree = new DockableSplitDockTree(); createTree(new SplitDockTreeFactory(tree)); return tree; }