597Putting It All Together
newPos = [newPos,dvPos(2),max(0.001,h2Pos(1)+h2Pos(3)-
newPos),dvPos(4)];
set(h2,'pos',newPos);
updateLogicalSubPane(h2);
end
else % vertical
if ~isa(hDivider,'hg.uicontrol') % regular java obj
% Bottom sub-pane
set(h1,'position',[0,0,1,dvPos]);
h1PixPos = getPixelPos(h1);
setPixelPos(h1,[0,0,max(1,h1PixPos(3)),max(1,h1PixPos(4))]);
% this is theoretically unneeded, used to align with pixel
boundaries
% Top sub-pane
set(h2,'position',[0,dvPos,1,1-dvPos]);
h2PixPos = getPixelPos(h2);
parentPixPos = getPixelPos(hDivider.Parent);
h2Height = max(1, parentPixPos(4)-dvPixPos(2)-dvPixPos(4));
setPixelPos(h2,[0,dvPixPos(2)+dvPixPos(4),h2PixPos(3)+3,h2Height]);
else % old ML6 uicontrol obj
% Bottom sub-pane
dvPos = hDivider.position; ...