61,61c61,61 < /* --- > /** 62a63,65 > * subelements. The layout is not actually performed but just > * its dimensions are calculated. The insets for this figure > * are included in the return value. 62,62c62,62 < * Calculate the layout for the figure and all its subelements. The --- > * Calculate the layout for the figure and all its 63,64d62 < * layout is not actually performed but just its dimensions are calculated. < * Insets are added for all non-top-level figures. 71,71c72,72 < int maxHeight = 0; --- > int maxHeight = getInsets().top; 82,84d82 < // add insets to calculated rectangle < r.grow(layoutStrategy.getInsets().left + layoutStrategy.getInsets().right, < layoutStrategy.getInsets().top + layoutStrategy.getInsets().bottom); 89,89c87,87 < maxWidth = Math.max(maxWidth, r.width); --- > maxWidth = Math.max(maxWidth, 89a88,89 > r.width + getInsets().left + > getInsets().right); 91a92,92 > maxHeight += getInsets().bottom; 115a117,120 > Point partCorner = new Point > (r.x + r.width - getInsets().right, > r.y + maxHeight + > currentFigure.displayBox().height); 116,121d116 < < // Fix for bug request ID 548000 < // Previously was < // Point partCorner = new Point(r.x + getInsets().left + r.width, r.y + currentFigure.displayBox().height); < // The right inset wasn't included in the calculation < Point partCorner = new Point(r.x + getInsets().left - getInsets().right + r.width, r.y + currentFigure.displayBox().height); 127,131d125 < // the maximum width has been already calculated < // Fix for bug request ID 548000 < // Previously was < // Point partCorner = new Point(r.x + getInsets().left + r.width, r.y + currentFigure.displayBox().height); < // The right inset wasn't included in the calculation