}
private Rectangle getContentLimitedBorderEdge(RenderingContext c) {
Rectangle result = getPaintingBorderEdge(c);
ContentLimit limit = _contentLimitContainer.getContentLimit(c.getPageNo());
if (limit == null) {
XRLog.layout(Level.WARNING, "No content limit found");
return result;
} else {
if (limit.getTop() == ContentLimit.UNDEFINED ||
limit.getBottom() == ContentLimit.UNDEFINED) {
return result;
}
RectPropertySet padding = getPadding(c);
BorderPropertySet border = getBorder(c);
int top;
if (c.getPageNo() == _contentLimitContainer.getInitialPageNo()) {
top = result.y;
} else {
top = limit.getTop() - (int)padding.top() -
(int)border.top() - getStyle().getBorderVSpacing(c);
if (getChildCount() > 0) {
TableSectionBox section = (TableSectionBox)getChild(0);
if (section.isHeader()) {
top -= section.getHeight();
}
}
}
int bottom;
if (c.getPageNo() == _contentLimitContainer.getLastPageNo()) {
bottom = result.y + result.height;
} else {
bottom = limit.getBottom() + (int)padding.bottom() +
(int)border.bottom() + getStyle().getBorderVSpacing(c);
if (getChildCount() > 0) {
TableSectionBox section = (TableSectionBox)getChild(getChildCount()-1);
if (section.isFooter()) {
bottom += section.getHeight();