return arrangeRF(container, g2, constraint);
return arrangeRF(container, g2, constraint);
/** * Arranges a container with range constraints for both the horizontal * and vertical. * * @param container the container. * @param g2 the graphics device. * @param constraint the constraint. * * @return The size of the container. */ protected Size2D arrangeRR(BlockContainer container, Graphics2D g2, RectangleConstraint constraint) { // first arrange without constraints, and see if this fits within // the required ranges... Size2D s1 = arrangeNN(container, g2); if (constraint.getHeightRange().contains(s1.height)) { return s1; // TODO: we didn't check the width yet } else { RectangleConstraint c = constraint.toFixedHeight( constraint.getHeightRange().getUpperBound() ); return arrangeRF(container, g2, c); } }
/** * Arranges a container with range constraints for both the horizontal * and vertical. * * @param container the container. * @param g2 the graphics device. * @param constraint the constraint. * * @return The size of the container. */ protected Size2D arrangeRR(BlockContainer container, Graphics2D g2, RectangleConstraint constraint) { // first arrange without constraints, and see if this fits within // the required ranges... Size2D s1 = arrangeNN(container, g2); if (constraint.getHeightRange().contains(s1.height)) { return s1; // TODO: we didn't check the width yet } else { RectangleConstraint c = constraint.toFixedHeight( constraint.getHeightRange().getUpperBound() ); return arrangeRF(container, g2, c); } }