Package org.apache.fop.layout

Examples of org.apache.fop.layout.Page


        }
    }
   
       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

    }

    public void createPage() {

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

    }
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

        // 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

        }
    }
   
       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

        if (marker == START) {
            marker = 0;
            // locate qualifying areas by 'marker-class-name' and
            // 'retrieve-boundary'. Initially we will always check
            // the containing page
            Page containingPage = area.getPage();
            bestMarker = searchPage(containingPage);

            if (bestMarker != null) {
                bestMarker.resetMarkerContent();
                return bestMarker.layoutMarker(area);
            }
            // If marker not yet found, and 'retrieve-boundary' permits,
            // search backward.
            AreaTree areaTree = containingPage.getAreaTree();
            if (retrieveBoundary == RetrieveBoundary.PAGE_SEQUENCE) {
                PageSequence pageSequence = areaTree.getCurrentPageSequence();
                if (pageSequence == containingPage.getPageSequence() ) {
                    return layoutBestMarker(areaTree.getCurrentPageSequenceMarkers(),area);
                }
            } else if (retrieveBoundary == RetrieveBoundary.DOCUMENT) {
                return layoutBestMarker(areaTree.getDocumentMarkers(),area);
            } else if (retrieveBoundary != RetrieveBoundary.PAGE) {
View Full Code Here

            }
        }

        // make pages and layout content
        int status = Status.OK;
        Page currentPage = null;
        do {
            boolean isBlankPage = false;

            // for this calculation we are already on the
            // blank page
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.