Package org.axsl.area

Examples of org.axsl.area.RegionBodyRefArea


     * on the page.
     */
    public boolean layoutFootnote(final PageArea p,
            final GraftingPoint graftingPoint) {
        /* TODO: This needs to handle multiple body-regions properly. */
        final RegionBodyRefArea bac = p.getRegionBody("xsl-region-body");
        final FootnoteRefArea footArea = bac.getFootnoteRefArea();
        try {
            layoutFootnoteSeparator(bac, footArea);
            final Status status = layout(footArea, graftingPoint);
            if (status.isIncomplete()) {
                // add as a pending footnote
View Full Code Here


             * Because of markers, lay out the fo:flow first, then the
             * static content. This is likely also justifiable because of spec.
             */
            final FlowPL flowPL = (FlowPL) this.getLayoutProxy(flow);
            for (String regionBodyName : regionBodies) {
                final RegionBodyRefArea bodyArea = currentPage.getRegionBody(
                        regionBodyName);
                flowPL.layout(bodyArea, null);
            }
            this.formatStaticContent(currentPage);
            currentPage.layoutComplete();
View Full Code Here

        if (getProgress() == FONodePL.START) {
            setProgress(0);
        }

        // flow is *always* laid out into a BodyAreaContainer
        final RegionBodyRefArea bac = (RegionBodyRefArea) areaNode;

        boolean prevChildMustKeepWithNext = false;
        final int numChildren = getFONode().getChildCount();
        for (int i = getProgress(); i < numChildren; i++) {
            final Fo fo = getFONode().getChildAt(i);

            if (bac.getMainRefArea().isBalancingRequired(fo)) {
                // reset the the just-done span area in preparation
                // for a backtrack for balancing
                bac.getMainRefArea().resetSpanArea();

                rollback(getProgressSnapshot());
                // one less because of the "continue"
                i = getProgress() - 1;
                continue;
            }
            // current column area
            final Area currentArea = bac.getMainRefArea().getNormalFlow(fo);
            if (bac.getMainRefArea().isNewSpanArea()) {
                setProgress(i);
                setProgressSnapshot(getProgressSnapshot(new
                        ArrayList<Integer>()));
            }

            setStatus(getLayoutProxy(fo).layout(currentArea, graftingPoint));

            if (getStatus().isIncomplete()) {
                if (prevChildMustKeepWithNext
                        && (getStatus().laidOutNone())) {
                    setProgress(i - 1);
                    final Fo prevChild = getFONode().getChildAt(getProgress());
                    final FObjPL prevChildPL = (FObjPL) getLayoutProxy(
                            prevChild);
                    prevChildPL.resetProgress();
                    setStatus(Status.AREA_FULL_SOME);
                    return getStatus();
                    // should probably return AREA_FULL_NONE if first
                    // or perhaps an entirely new status code
                }
                if (bac.getMainRefArea().isLastColumn()) {
                    if (getStatus() == Status.FORCE_COLUMN_BREAK) {
                        setProgress(i);
                        // same thing
                        setStatus(Status.FORCE_PAGE_BREAK);
                        return getStatus();
View Full Code Here

TOP

Related Classes of org.axsl.area.RegionBodyRefArea

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.