public void updateHeaderFooterPosition(RenderingContext c) { ContentLimit limit = _contentLimitContainer.getContentLimit(c.getPageNo()); if (limit != null) { updateHeaderPosition(c, limit); updateFooterPosition(c, limit); } }
List sequences = getSortedPageSequences(); int initial = 0; if (c.getInitialPageNo() > 0) { initial = c.getInitialPageNo() - 1; } if (sequences == null) { return initial + c.getPageNo(); } else { int sequenceStartIndex = getPageSequenceStart(c, sequences, c.getPage()); if (sequenceStartIndex == -1) { return initial + c.getPageNo(); } else { BlockBox block = (BlockBox)sequences.get(sequenceStartIndex); return c.getPageNo() - getFirstPage(c, block).getPageNo(); } } } public int getRelativePageCount(RenderingContext c) {
public int getRelativePageNo(RenderingContext c) { List sequences = getSortedPageSequences(); int initial = 0; if (c.getInitialPageNo() > 0) { initial = c.getInitialPageNo() - 1; } if (sequences == null) { return initial + c.getPageNo(); } else { int sequenceStartIndex = getPageSequenceStart(c, sequences, c.getPage()); if (sequenceStartIndex == -1) { return initial + c.getPageNo(); } else { BlockBox block = (BlockBox)sequences.get(sequenceStartIndex); return c.getPageNo() - getFirstPage(c, block).getPageNo(); } } }
public void updateHeaderFooterPosition(RenderingContext c) { ContentLimit limit = _contentLimitContainer.getContentLimit(c.getPageNo()); if (limit != null) { updateHeaderPosition(c, limit); updateFooterPosition(c, limit); } }
protected void exportPageBoxText(RenderingContext c, Writer writer, int yPos) throws IOException { c.getPage().exportTrailingText(c, writer); List pages = c.getRootLayer().getPages(); PageBox next = (PageBox)pages.get(c.getPageNo()+1); c.setPage(next.getPageNo(), next); while (next.getBottom() < yPos) { next.exportLeadingText(c, writer); next.exportTrailingText(c, writer); next = (PageBox)pages.get(c.getPageNo()+1); c.setPage(next.getPageNo(), next); } next.exportLeadingText(c, writer); }
protected void exportPageBoxText(RenderingContext c, Writer writer, int yPos) throws IOException { c.getPage().exportTrailingText(c, writer); List pages = c.getRootLayer().getPages(); PageBox next = (PageBox)pages.get(c.getPageNo()+1); c.setPage(next.getPageNo(), next); while (next.getBottom() < yPos) { next.exportLeadingText(c, writer); next.exportTrailingText(c, writer); next = (PageBox)pages.get(c.getPageNo()+1); c.setPage(next.getPageNo(), next); } next.exportLeadingText(c, writer); }
private void exportPageBoxText(RenderingContext c, Writer writer) throws IOException { c.getPage().exportTrailingText(c, writer); if (c.getPage() != c.getRootLayer().getLastPage()) { List pages = c.getRootLayer().getPages(); do { PageBox next = (PageBox)pages.get(c.getPageNo()+1); c.setPage(next.getPageNo(), next); next.exportLeadingText(c, writer); next.exportTrailingText(c, writer); } while (c.getPage() != c.getRootLayer().getLastPage()); } }
private void exportPageBoxText(RenderingContext c, Writer writer) throws IOException { c.getPage().exportTrailingText(c, writer); if (c.getPage() != c.getRootLayer().getLastPage()) { List pages = c.getRootLayer().getPages(); do { PageBox next = (PageBox)pages.get(c.getPageNo()+1); c.setPage(next.getPageNo(), next); next.exportLeadingText(c, writer); next.exportTrailingText(c, writer); } while (c.getPage() != c.getRootLayer().getLastPage()); } }
private void updateFooterPosition(RenderingContext c, ContentLimit limit) { if (limit.getBottom() != ContentLimit.UNDEFINED || c.getPageNo() == _contentLimitContainer.getLastPageNo()) { if (getChildCount() > 0) { TableSectionBox section = (TableSectionBox)getChild(getChildCount()-1); if (section.isFooter()) { if (! section.isCapturedOriginalAbsY()) { section.setOriginalAbsY(section.getAbsY()); section.setCapturedOriginalAbsY(true); } int newAbsY; if (c.getPageNo() == _contentLimitContainer.getLastPageNo()) { newAbsY = section.getOriginalAbsY(); } else { newAbsY = limit.getBottom(); } int diff = newAbsY - section.getAbsY(); if (diff != 0) { section.setY(section.getY() + diff); section.calcCanvasLocation(); section.calcChildLocations(); section.calcPaintingInfo(c, false); } } } } }
private void updateFooterPosition(RenderingContext c, ContentLimit limit) { if (limit.getBottom() != ContentLimit.UNDEFINED || c.getPageNo() == _contentLimitContainer.getLastPageNo()) { if (getChildCount() > 0) { TableSectionBox section = (TableSectionBox)getChild(getChildCount()-1); if (section.isFooter()) { if (! section.isCapturedOriginalAbsY()) { section.setOriginalAbsY(section.getAbsY()); section.setCapturedOriginalAbsY(true); } int newAbsY; if (c.getPageNo() == _contentLimitContainer.getLastPageNo()) { newAbsY = section.getOriginalAbsY(); } else { newAbsY = limit.getBottom(); } int diff = newAbsY - section.getAbsY(); if (diff != 0) { section.setY(section.getY() + diff); section.calcCanvasLocation(); section.calcChildLocations(); section.calcPaintingInfo(c, false); } } } } }
private void updateHeaderPosition(RenderingContext c, ContentLimit limit) { if (limit.getTop() != ContentLimit.UNDEFINED || c.getPageNo() == _contentLimitContainer.getInitialPageNo()) { if (getChildCount() > 0) { TableSectionBox section = (TableSectionBox)getChild(0); if (c.getPageNo() == _contentLimitContainer.getInitialPageNo()) { newAbsY = section.getOriginalAbsY(); } else {
private Rectangle getContentLimitedBorderEdge(RenderingContext c) { Rectangle result = getPaintingBorderEdge(c); ContentLimit limit = _contentLimitContainer.getContentLimit(c.getPageNo()); if (c.getPageNo() == _contentLimitContainer.getInitialPageNo()) { top = result.y; } else { if (c.getPageNo() == _contentLimitContainer.getLastPageNo()) { bottom = result.y + result.height; } else {
private void updateHeaderPosition(RenderingContext c, ContentLimit limit) { if (limit.getTop() != ContentLimit.UNDEFINED || c.getPageNo() == _contentLimitContainer.getInitialPageNo()) { if (getChildCount() > 0) { TableSectionBox section = (TableSectionBox)getChild(0); if (section.isHeader()) { if (! section.isCapturedOriginalAbsY()) { section.setOriginalAbsY(section.getAbsY()); section.setCapturedOriginalAbsY(true); } int newAbsY; if (c.getPageNo() == _contentLimitContainer.getInitialPageNo()) { newAbsY = section.getOriginalAbsY(); } else { newAbsY = limit.getTop() - getStyle().getBorderVSpacing(c) - section.getHeight(); } int diff = newAbsY - section.getAbsY(); if (diff != 0) { section.setY(section.getY() + diff); section.calcCanvasLocation(); section.calcChildLocations(); section.calcPaintingInfo(c, false); } } } } }
private Rectangle getContentLimitedBorderEdge(RenderingContext c) { Rectangle result = getPaintingBorderEdge(c); ContentLimit limit = _contentLimitContainer.getContentLimit(c.getPageNo()); if (c.getPageNo() == _contentLimitContainer.getInitialPageNo()) { top = result.y; } else { if (c.getPageNo() == _contentLimitContainer.getLastPageNo()) { bottom = result.y + result.height; } else {