// move all the items that were before dockable
for( int i = baseIndex - 1; i >= 0; i-- ){
currentDockable = children[i];
currentStation = dockable.getDockParent();
Location base = callback.getLocation( dockable );
Location movingLocation = new Location( base.getMode(), base.getRoot(), copyAndSetStackLocation( base.getLocation(), i - baseIndex + 1 - missing ) );
callback.setLocation( currentDockable, movingLocation );
if( currentDockable.getDockParent() != dockable.getDockParent() ){
missing++;
}
}
// move all the items that were after dockable
for( int i = baseIndex + 1; i < children.length; i++ ){
currentDockable = children[i];
currentStation = dockable.getDockParent();
Location base = callback.getLocation( dockable );
Location movingLocation = new Location( base.getMode(), base.getRoot(), copyAndSetStackLocation( base.getLocation(), i - baseIndex - missing ) );
callback.setLocation( currentDockable, movingLocation );
if( currentDockable.getDockParent() != dockable.getDockParent() ){
missing++;
}
}