Examples of PageArea


Examples of org.axsl.area.PageArea

     * Create a blank page.
     * @throws AreaTreeException If the FO Tree cannot provide the
     * information needed to create the page.
     */
    private void makeBlankPage() throws AreaTreeException {
        final PageArea pageArea = makePage(Force.NONE);
        pageArea.layoutComplete();
    }
View Full Code Here

Examples of org.axsl.area.PageArea

        this.setLayoutProxy(flow, new FlowPL(flow, this));
        final List<String> regionBodies = flow.regionBodies();

        // make pages and layout content
        Status status = Status.UNKNOWN;
        PageArea currentPage = null;
        while (status.isIncomplete()) {
            PageCollection.Force force = PageCollection.Force.NONE;
            if (status == Status.FORCE_PAGE_BREAK_EVEN) {
                force = PageCollection.Force.EVEN;
            } else if (status == Status.FORCE_PAGE_BREAK_ODD) {
                force = PageCollection.Force.ODD;
            }
            final PageArea newPage = pageCollection.makePage(force);
            setPendingFootnotes(newPage);
            currentPage = newPage;
            /*
             * Because of markers, lay out the fo:flow first, then the
             * static content. This is likely also justifiable because of spec.
View Full Code Here

Examples of org.axsl.area.PageArea

        }

        /* Layout the FootnoteBody. */
        final FootnoteBody fbody = this.node.getFootnoteBody();
        final FootnoteBodyPL fbPL = (FootnoteBodyPL) getLayoutProxy(fbody);
        final PageArea page = areaNode.getPage();
        /* If the footnote cannot be entirely laid out on the current page,
         * it will be added to the list of pending footnotes. */
        fbPL.layoutFootnote(page, graftingPoint);
        return Status.OK;
    }
View Full Code Here

Examples of org.axsl.area.PageArea

    public Status layout(final AreaNode areaNode,
            final GraftingPoint graftingPoint) throws AreaTreeException {
        /* RetrieveMarker can only exist in static content, so we don't care
         * about tracking or setting progress at all. It either fits or it
         * doesn't. */
        final PageArea containingPage = areaNode.getPage();
        final Marker bestMarker = containingPage.bestMarker(this.node);
        if (bestMarker == null) {
            return Status.OK;
        }
        final MarkerPL markerPL = (MarkerPL) this.getLayoutProxy(bestMarker);
        // Necessary because the marker may get used multiple times.
View Full Code Here

Examples of org.eclipse.birt.report.engine.layout.area.impl.PageArea

        long span = System.currentTimeMillis();

        if (rangeChecker.checkRange(currentPageIndex)) {
            if (exportBodyOnly) {

                PageArea pa = (PageArea) currentFrame.getData();
                IContainerArea body = pa.getBody();

                // locate body frame first
                Frame bodyFrame = locateChildFrame(currentFrame, body);

                if (bodyFrame instanceof AreaFrame) {
                    // adjust offsets
                    ((AreaFrame) bodyFrame).setXOffset(-bodyFrame.getLeft());
                    ((AreaFrame) bodyFrame).setYOffset(-bodyFrame.getTop());
                }

                if (exportSingleSheet) {
                    // aggregate only
                    if (singleContainer == null) {
                        singleContainer = new AggregateFrame();
                        singleContainer.setRight(bodyFrame.getRight() - bodyFrame.getLeft());
                        singleContainer.setBottom(bodyFrame.getBottom() - bodyFrame.getTop());
                    } else {
                        int yOff = singleContainer.getBottom();
                        singleContainer.setBottom(yOff + bodyFrame.getBottom() - bodyFrame.getTop());

                        if (bodyFrame instanceof AreaFrame) {
                            ((AreaFrame) bodyFrame).setYOffset(yOff + ((AreaFrame) bodyFrame).getYOffset());
                        }
                    }

                    singleContainer.addChild(bodyFrame);
                    if (bodyFrame instanceof AreaFrame) {
                        ((AreaFrame) bodyFrame).setParent(singleContainer);
                    }

                    if (DEBUG) {
                        logger.log(Level.INFO, "------------aggregate sheet[" //$NON-NLS-1$
                                + (currentPageIndex) + "] using " //$NON-NLS-1$
                                + (System.currentTimeMillis() - span) + " ms"); //$NON-NLS-1$
                    }
                } else if (aggregateOnFirstLevel) {
                    // aggregate only
                    singleContainer = multiPageContainer.get(AggregateFinder.get().getPageNum());
                    if (singleContainer == null) {
                        singleContainer = new AggregateFrame();
                        singleContainer.setRight(bodyFrame.getRight() - bodyFrame.getLeft());
                        singleContainer.setBottom(bodyFrame.getBottom() - bodyFrame.getTop());
                        multiPageContainer.put(new Integer(AggregateFinder.get().getPageNum()), singleContainer);
                    } else {
                        int yOff = singleContainer.getBottom();
                        singleContainer.setBottom(yOff + bodyFrame.getBottom() - bodyFrame.getTop());

                        if (bodyFrame instanceof AreaFrame) {
                            ((AreaFrame) bodyFrame).setYOffset(yOff + ((AreaFrame) bodyFrame).getYOffset());
                        }
                    }

                    singleContainer.addChild(bodyFrame);
                    if (bodyFrame instanceof AreaFrame) {
                        ((AreaFrame) bodyFrame).setParent(singleContainer);
                    }

                    if (DEBUG) {
                        logger.log(Level.INFO, "------------aggregate sheet[" //$NON-NLS-1$
                                + (currentPageIndex) + "] using " //$NON-NLS-1$
                                + (System.currentTimeMillis() - span) + " ms"); //$NON-NLS-1$
                    }
                } else {
                    // export body frame
                    Sheet modelSheet = Transformer.toSheet(bodyFrame,
                            1000,
                            fixedColumnWidth * 1000);
                    exportSheet(modelSheet);

                    if (DEBUG) {
                        logger.log(Level.INFO, "------------export sheet[" //$NON-NLS-1$
                                + (currentPageIndex) + "] using " //$NON-NLS-1$
                                + (System.currentTimeMillis() - span) + " ms"); //$NON-NLS-1$
                    }
                }
            } else {
                if (exportSingleSheet) {
                    // aggregate only
                    if (singleContainer == null) {
                        singleContainer = new AggregateFrame();
                        singleContainer.setRight(currentFrame.getRight() - currentFrame.getLeft());
                        singleContainer.setBottom(currentFrame.getBottom() - currentFrame.getTop());
                    } else {
                        int yOff = singleContainer.getBottom();
                        singleContainer.setBottom(yOff + currentFrame.getBottom() - currentFrame.getTop());

                        if (currentFrame instanceof AreaFrame) {
                            ((AreaFrame) currentFrame).setYOffset(yOff);
                        }
                    }

                    singleContainer.addChild(currentFrame);
                    if (currentFrame instanceof AreaFrame) {
                        ((AreaFrame) currentFrame).setParent(singleContainer);
                    }

                    if (DEBUG) {
                        logger.log(Level.INFO, "------------aggregate sheet[" //$NON-NLS-1$
                                + (currentPageIndex) + "] using " //$NON-NLS-1$
                                + (System.currentTimeMillis() - span) + " ms"); //$NON-NLS-1$
                    }
                } else if (aggregateOnFirstLevel) {
                    PageArea pa = (PageArea) currentFrame.getData();
                    IContainerArea header = pa.getHeader();

                    singleContainer = multiPageContainer.get(AggregateFinder.get().getPageNum());
                    // aggregate only
                    if (singleContainer == null) {
                        singleContainer = new AggregateFrame();
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.