Package org.apache.fop.layout

Examples of org.apache.fop.layout.Page


                throw new FOPException("Flow '" + flow.getFlowName()
                                       + "' does not map to the region-body in page-master '"
                                       + currentSimplePageMaster.getMasterName() + "'", systemId, line, column);
            }
        }
        Page newPage = this.currentSimplePageMaster.getPageMaster()
          .makePage(areaTree);
        newPage.setNumber(this.currentPageNumber);
        String formattedPageNumber =
          pageNumberGenerator.makeFormattedPageNumber(this.currentPageNumber);
        newPage.setFormattedNumber(formattedPageNumber);
        newPage.setPageSequence(this);
        if (!isBlankPage) {
            log.info("[" + currentPageNumber + "]");
            BodyAreaContainer bodyArea = newPage.getBody();
            bodyArea.setIDReferences(areaTree.getIDReferences());
            if (currentPage != null) {
                ArrayList foots = currentPage.getPendingFootnotes();
                newPage.setPendingFootnotes(foots);
            }
            flow.layout(bodyArea);
        } else {
            log.info("[" + currentPageNumber + "] (blank)");
            if (currentPage != null) {
                ArrayList foots = currentPage.getPendingFootnotes();
                if (foots != null) {
                    BodyAreaContainer bodyArea = newPage.getBody();
                    bodyArea.setIDReferences(areaTree.getIDReferences());
                    newPage.setPendingFootnotes(foots);
                }
            }
        }
        // because of markers, do after fo:flow (likely also
        // justifiable because of spec)
View Full Code Here


     
    }
 
    public void createPage () {

  bookComponent.pages.addElement(new Page());
 
    }
View Full Code Here

    // specification which should be handled in getNextSubsequence. That's not done here.
        if ( pageMaster == null )
        {
    throw new FOPException("page masters exhausted. Cannot recover.");
        }
        Page p = pageMaster.makePage(areaTree);
        if(currentPage != null) {
            Vector foots = currentPage.getPendingFootnotes();
            p.setPendingFootnotes(foots);
        }
        return p;
    }
View Full Code Here

    }

    public void createPage() {

        bookComponent.pages.addElement(new Page());

    }
View Full Code Here

        }
    }
   
       public Page getNextPage(Page current, boolean isWithinPageSequence,
                            boolean isFirstCall) {
        Page nextPage = null;
        int pageIndex = 0;
        if (isFirstCall)
            pageIndex = renderQueue.size();
        else
            pageIndex = renderQueue.indexOf(current);
        if ((pageIndex + 1) < renderQueue.size()) {
            nextPage = (Page)renderQueue.elementAt(pageIndex + 1);
            if (isWithinPageSequence
                    &&!nextPage.getPageSequence().equals(current.getPageSequence())) {
                nextPage = null;
            }
        }
        return nextPage;
    }
View Full Code Here

        return nextPage;
    }

    public Page getPreviousPage(Page current, boolean isWithinPageSequence,
                                boolean isFirstCall) {
        Page previousPage = null;
        int pageIndex = 0;
        if (isFirstCall)
            pageIndex = renderQueue.size();
        else
            pageIndex = renderQueue.indexOf(current);
        // System.out.println("Page index = " + pageIndex);
        if ((pageIndex - 1) >= 0) {
            previousPage = (Page)renderQueue.elementAt(pageIndex - 1);
            PageSequence currentPS = current.getPageSequence();
            // System.out.println("Current PS = '" + currentPS + "'");
            PageSequence previousPS = previousPage.getPageSequence();
            // System.out.println("Previous PS = '" + previousPS + "'");
            if (isWithinPageSequence &&!previousPS.equals(currentPS)) {
                // System.out.println("Outside page sequence");
                previousPage = null;
            }
View Full Code Here

    // specification which should be handled in getNextSubsequence. That's not done here.
        if ( pageMaster == null )
        {
    throw new FOPException("page masters exhausted. Cannot recover.");
        }
        Page p = pageMaster.makePage(areaTree);
        if(currentPage != null) {
            Vector foots = currentPage.getPendingFootnotes();
            p.setPendingFootnotes(foots);
        }
        return p;
    }
View Full Code Here

        // a legal alternative is to use the last sub-sequence
        // specification which should be handled in getNextSubsequence. That's not done here.
        if (pageMaster == null) {
            throw new FOPException("page masters exhausted. Cannot recover.");
        }
        Page p = pageMaster.makePage(areaTree);
        if (currentPage != null) {
            Vector foots = currentPage.getPendingFootnotes();
            p.setPendingFootnotes(foots);
        }
        return p;
    }
View Full Code Here

    // specification which should be handled in getNextSubsequence. That's not done here.
        if ( pageMaster == null )
        {
    throw new FOPException("page masters exhausted. Cannot recover.");
        }
        Page p = pageMaster.makePage(areaTree);
        if(currentPage != null) {
            Vector foots = currentPage.getPendingFootnotes();
            p.setPendingFootnotes(foots);
        }
        return p;
    }
View Full Code Here

TOP

Related Classes of org.apache.fop.layout.Page

Copyright © 2018 www.massapicom. 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.