Examples of PageCollection


Examples of org.axsl.area.PageCollection

     * @param pageArea The page area whose static content should be laid out.
     * @throws AreaTreeException For errors during layout.
     */
    public void formatStaticContent(final PageArea pageArea)
            throws AreaTreeException {
        final PageCollection areaTree = pageArea.getPageCollection();
        final PageSequence pageSeq = areaTree.getPageSequence();
        final SimplePageMaster simpleMaster = pageArea.getPageMaster();

        // region-before
        layoutStaticContent(pageSeq, simpleMaster.getRegionBefore(),
                pageArea.getRegionBefore());
View Full Code Here

Examples of org.axsl.galley.PageCollection

    /**
     * If necessary, creates a new page label range entry in the PDF document.
     * @param page The new area tree page being processed.
     */
    private void checkPageLabels(final Page page) {
        final PageCollection currentCollection = page.getParent();
        final PositiveIntegerFormatter currentFormatter =
                currentCollection.getPageNumberFormatter();
        final PdfPageLabelStyle labelStyle = PDFRenderer
                .convertPageLabelStyle(currentFormatter.getType());

        /* Handle special case of the first page. */
        if (this.currentAreaTreePage == null) {
            this.pdfDoc.addPageLabelRange(0, labelStyle,
                    currentCollection.getPageNumberPrefix(), page.getNumber());
            return;
        }

        /* In all other cases, we are looking for changes from the last page. */
        final PageCollection previousCollection =
                this.currentAreaTreePage.getParent();
        if (currentCollection == previousCollection) {
            /* The pages are in the same PageCollection. No new page label range
             * entry is needed. */
            return;
        }
        final PositiveIntegerFormatter previousFormatter =
            previousCollection.getPageNumberFormatter();
        if (currentFormatter.getType() == previousFormatter.getType()
                && currentCollection.getPageNumberPrefix()
                        .equals(previousCollection.getPageNumberPrefix())
                && page.getNumber() == this.pageCount) {
            return;
        }
        this.pdfDoc.addPageLabelRange(this.pageCount - 1, labelStyle,
                currentCollection.getPageNumberPrefix(), page.getNumber());
View Full Code Here

Examples of org.blueoxygen.aconix.entity.PageCollection

    if (hasActionErrors()) {
      return INPUT;
    }
    LogInformation logInfo;
    PageCollection pCol;
    if (getPCol().getId() == null || "".equalsIgnoreCase(getPCol().getId())) {
      logInfo = new LogInformation();
      pCol = new PageCollection();

      logInfo.setCreateBy(sess.getCurrentUser().getId());
      logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
    } else {
      pCol = (PageCollection) getManager().getById(PageCollection.class,
          getPCol().getId());
      logInfo = pCol.getLogInformation();
    }

    logInfo.setLastUpdateBy(sess.getCurrentUser().getId());
    logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
    logInfo.setActiveFlag(getActive());

    pCol.setName(getPCol().getName());
    pCol.setDescription(getPCol().getDescription());
    pCol.setLogInformation(logInfo);
    getManager().save(pCol);
    setPCol(pCol);

    return SUCCESS;
  }
View Full Code Here

Examples of org.foray.area.PageCollection

     * Returns the first normal-flow reference area in a given area tree.
     * @param areaTree The area tree being tested.
     * @return The first normal-flow reference area in {@code areaTree}.
     */
    protected NormalFlowRA getFirstNormalFlowArea(final AreaTree areaTree) {
        final PageCollection pageCollection = getPageCollection(areaTree, 1);
        final PageRA firstPage = getPage(pageCollection, 1);
        final RegionRABody regionBody = firstPage.getRegionBody(
                "xsl-region-body");
        final MainRA main = regionBody.getMainRefArea();
        AreaNode node = main.getChildAt(0);
View Full Code Here

Examples of org.foray.area.PageCollection

     */
    protected PageCollection getPageCollection(final AreaTree areaTree,
            final int collectionNum) {
        final AreaNode node = areaTree.getChildAt(0);
        assertTrue(node instanceof PageCollection);
        final PageCollection pageCollection = (PageCollection) node;
        return pageCollection;
    }
View Full Code Here

Examples of org.foray.area.PageCollection

        final PioneerLS layout = this.layoutFactory.makeLayout();
        final Iterator<PageSequence> iterator = root.getPageSequenceIterator();
        while (iterator.hasNext()) {
            final PageSequence pageSequence = iterator.next();
            try {
                final PageCollection collection = areaTree.makePageCollection(
                        pageSequence);
                layout.formatPageSequence(collection);
            } catch (final AreaTreeException e) {
                throw new FOrayException(e);
            }
View Full Code Here

Examples of org.foray.area.PageCollection

    @Test
    public void testBlock002() throws FOrayException {
        final AreaTreeCreator creator = AreaTreeCreator.getInstance();
        final AreaTree areaTree = creator.buildAreaTree(
                "fo/block-002.fo");
        final PageCollection pageCollection = this.getPageCollection(areaTree,
                1);
        final int numPages = pageCollection.getChildCount();
        assertEquals(2, numPages);
        final String documentContent = this.getText(areaTree);
        final String testString =
            " This document is on a short (4 inches high) page, "
            + "and contains one block. "
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.