@Override public <N> N submit( SplitTreeFactory<N> factory ) { if( orientation == SplitDockStation.Orientation.HORIZONTAL ) return factory.horizontal( left.submit( factory ), right.submit( factory ), divider, getId(), getPlaceholders(), getPlaceholderMap(), isVisible() ); else return factory.vertical( left.submit( factory ), right.submit( factory ), divider, getId(), getPlaceholders(), getPlaceholderMap(), isVisible() ); }
@Override public boolean insert( SplitDockPlaceholderProperty property, Dockable dockable ){ boolean done = child != null && child.insert( property, dockable ); if( !done ){ return getAccess().drop( dockable, property.toSplitLocation( this ), this ); } return true; }
/** * Makes sure that <code>placeholder</code> is not found anywhere * @param placeholder the element to remove * @param exception the entry that should not be modified */ private void clearPlaceholder( Path placeholder, Entry exception ){ clearPlaceholder( getRoot().getChild(), placeholder, exception ); }
@Override public void evolve( SplitDockTree<Dockable>.Key key, boolean checkValidity, Map<Leaf, Dockable> linksToSet ){ setPlaceholders( key.getTree().getPlaceholders( key ) ); setPlaceholderMap( key.getTree().getPlaceholderMap( key ) ); }
private long getLeafId( SplitDockPathProperty property ){ long leafId = property.getLeafId(); SplitDockPathProperty.Node lastNode = null; if( leafId == -1 ){ lastNode = property.getLastNode(); if( lastNode != null ){ leafId = lastNode.getId(); } } return leafId; }
public DockableDisplayer getOldDisplayer(){ SplitNode node = info.getNode(); if( node instanceof Leaf ){ return ((Leaf)node).getDisplayer(); } return null; }
public void execute(){ access.unsetDropInfo(); if( isMove() ){ access.move( putInfo, item ); } else{ access.drop( null, putInfo, item ); } }
public void handleLeaf( Leaf leaf ){ if( leaf != node ){ handle( leaf ); handle( leaf.getDockable() ); } }
@Override public void evolve( SplitDockTree<Dockable>.Key key, boolean checkValidity, Map<Leaf, Dockable> linksToSet ){ setPlaceholders( key.getTree().getPlaceholders( key ) ); }
@Override public boolean insert( SplitDockPlaceholderProperty property, Dockable dockable ){ Path placeholder = property.getPlaceholder(); if( hasPlaceholder( placeholder )){ return replace( placeholder, dockable ); } return false; }
private void ensureOnlyOnThisNode( Path placeholder ){ if( placeholder != null ){ getAccess().getPlaceholderSet().set( this, placeholder, this ); } }
public SplitDockStation layout( SplitDockStationLayout layout, Map<Integer, Dockable> children, PlaceholderStrategy placeholders ) { SplitDockStation station = createStation( layout.hasFullscreenAction() ); setLayout( station, layout, children, placeholders ); return station; }
/** * Calls {@link EntryListener#removed(SplitDockPerspective.Entry, SplitDockPerspective.Entry)} on all listeners that are currently * known to this perspective * @param parent the parent from which <code>child</code> was removed * @param child the child which was removed */ protected void fireRemoved( Entry parent, Entry child ){ for( EntryListener listener : listeners() ){ listener.removed( parent, child ); } }
public void run(){ if( !idChecked ){ idChecked = true; Root root = getRoot(); if( root != null ){ root.ensureIdUnique(); } } } });
@Override public void setBounds( double x, double y, double width, double height, double factorW, double factorH, boolean updateComponentBounds ){ super.setBounds( x, y, width, height, factorW, factorH, updateComponentBounds ); if( updateComponentBounds ){ resetDisplayerBounds(); } }
public DockableDisplayer getOldDisplayer(){ SplitNode node = info.getNode(); if( node instanceof Leaf ){ return ((Leaf)node).getDisplayer(); } return null; }