Package org.apache.fop.fo.pagination

Examples of org.apache.fop.fo.pagination.PageSequence


        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;
            }
        }
        return previousPage;
View Full Code Here


     */
    private void recurseFONode(FONode foNode) {
        invokeDeferredEvent(foNode, true);

        if (foNode instanceof PageSequence) {
            PageSequence pageSequence = (PageSequence) foNode;

            Region regionBefore = pagemaster.getRegion(Constants.FO_REGION_BEFORE);
            if (regionBefore != null) {
                FONode staticBefore = (FONode) pageSequence.getFlowMap().get(
                        regionBefore.getRegionName());
                if (staticBefore != null) {
                    recurseFONode(staticBefore);
                }
            }
            Region regionAfter = pagemaster.getRegion(Constants.FO_REGION_AFTER);
            if (regionAfter != null) {
                FONode staticAfter = (FONode) pageSequence.getFlowMap().get(
                        regionAfter.getRegionName());
                if (staticAfter != null) {
                    recurseFONode(staticAfter);
                }
            }


            recurseFONode( pageSequence.getMainFlow() );
        } else if (foNode instanceof Table) {
            Table table = (Table) foNode;

            //recurse all table-columns
            if (table.getColumns() != null) {
View Full Code Here

     */
    private void recurseFONode(FONode foNode) {
        invokeDeferredEvent(foNode, true);

        if (foNode instanceof PageSequence) {
            PageSequence pageSequence = (PageSequence) foNode;

            Region regionBefore = pagemaster.getRegion(Constants.FO_REGION_BEFORE);
            if (regionBefore != null) {
                FONode staticBefore = (FONode) pageSequence.getFlowMap().get(
                        regionBefore.getRegionName());
                if (staticBefore != null) {
                    recurseFONode(staticBefore);
                }
            }
            Region regionAfter = pagemaster.getRegion(Constants.FO_REGION_AFTER);
            if (regionAfter != null) {
                FONode staticAfter = (FONode) pageSequence.getFlowMap().get(
                        regionAfter.getRegionName());
                if (staticAfter != null) {
                    recurseFONode(staticAfter);
                }
            }


            recurseFONode( pageSequence.getMainFlow() );
        } else if (foNode instanceof Table) {
            Table table = (Table) foNode;

            //recurse all table-columns
            if (table.getColumns() != null) {
View Full Code Here

        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;
            }
        }
        return previousPage;
View Full Code Here

    public synchronized void queuePage(Page page)
    throws FOPException, IOException {

        // process markers
        PageSequence pageSequence = page.getPageSequence();
        if (pageSequence != currentPageSequence) {
            currentPageSequence = pageSequence;
            currentPageSequenceMarkers = null;
        }
        ArrayList markers = page.getMarkers();
View Full Code Here

            }
            // 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);
View Full Code Here

     */
    private void recurseFONode(FONode foNode) {
        invokeDeferredEvent(foNode, true);

        if (foNode instanceof PageSequence) {
            PageSequence pageSequence = (PageSequence) foNode;

            Region regionBefore = pagemaster.getRegion(Constants.FO_REGION_BEFORE);
            if (regionBefore != null) {
                FONode staticBefore = (FONode) pageSequence.getFlowMap().get(
                        regionBefore.getRegionName());
                if (staticBefore != null) {
                    recurseFONode(staticBefore);
                }
            }
            Region regionAfter = pagemaster.getRegion(Constants.FO_REGION_AFTER);
            if (regionAfter != null) {
                FONode staticAfter = (FONode) pageSequence.getFlowMap().get(
                        regionAfter.getRegionName());
                if (staticAfter != null) {
                    recurseFONode(staticAfter);
                }
            }


            recurseFONode( pageSequence.getMainFlow() );
        } else if (foNode instanceof Table) {
            Table table = (Table) foNode;

            //recurse all table-columns
            if (table.getColumns() != null) {
View Full Code Here

     */
    private void recurseFONode(FONode foNode) {
        invokeDeferredEvent(foNode, true);

        if (foNode instanceof PageSequence) {
            PageSequence pageSequence = (PageSequence) foNode;

            Region regionBefore = pagemaster.getRegion(Constants.FO_REGION_BEFORE);
            if (regionBefore != null) {
                FONode staticBefore = (FONode) pageSequence.getFlowMap().get(
                        regionBefore.getRegionName());
                if (staticBefore != null) {
                    recurseFONode(staticBefore);
                }
            }
            Region regionAfter = pagemaster.getRegion(Constants.FO_REGION_AFTER);
            if (regionAfter != null) {
                FONode staticAfter = (FONode) pageSequence.getFlowMap().get(
                        regionAfter.getRegionName());
                if (staticAfter != null) {
                    recurseFONode(staticAfter);
                }
            }


            recurseFONode( pageSequence.getMainFlow() );
        } else if (foNode instanceof Table) {
            Table table = (Table) foNode;

            //recurse all table-columns
            if (table.getColumns() != null) {
View Full Code Here

    }

    private void testGetNextPage(final Page[] providedPages, Page expectedPage, boolean isBlank) {

        final Flow flow = mock(Flow.class);
        final PageSequence pseq = mock(PageSequence.class);
        final Root root = mock(Root.class);
        final AreaTreeHandler ath = mock(AreaTreeHandler.class);

        when(flow.getFlowName()).thenReturn(MAIN_FLOW_NAME);
        when(pseq.getMainFlow()).thenReturn(flow);
        when(pseq.getRoot()).thenReturn(root);

        PageSequenceLayoutManager sut = new PageSequenceLayoutManager(ath, pseq) {

            @Override
            protected Page createPage(int i, boolean b) {
View Full Code Here

     */
    private void recurseFONode(FONode foNode) {
        invokeDeferredEvent(foNode, true);

        if (foNode instanceof PageSequence) {
            PageSequence pageSequence = (PageSequence) foNode;

            Region regionBefore = pagemaster.getRegion(Constants.FO_REGION_BEFORE);
            if (regionBefore != null) {
                FONode staticBefore = (FONode) pageSequence.getFlowMap().get(
                        regionBefore.getRegionName());
                if (staticBefore != null) {
                    recurseFONode(staticBefore);
                }
            }
            Region regionAfter = pagemaster.getRegion(Constants.FO_REGION_AFTER);
            if (regionAfter != null) {
                FONode staticAfter = (FONode) pageSequence.getFlowMap().get(
                        regionAfter.getRegionName());
                if (staticAfter != null) {
                    recurseFONode(staticAfter);
                }
            }


            recurseFONode( pageSequence.getMainFlow() );
        } else if (foNode instanceof Table) {
            Table table = (Table) foNode;

            //recurse all table-columns
            if (table.getColumns() != null) {
View Full Code Here

TOP

Related Classes of org.apache.fop.fo.pagination.PageSequence

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.