Examples of BodyAreaContainer


Examples of org.apache.fop.layout.BodyAreaContainer

    if (this.marker == START) {
      this.marker = 0;
    }
 
    // flow is *always* laid out into a BodyAreaContainer
    BodyAreaContainer bac = (BodyAreaContainer)area;
   
    boolean prevChildMustKeepWithNext = false;
 
    int numChildren = this.children.size();
    for (int i = this.marker; i < numChildren; i++) {
      FObj fo = (FObj) children.elementAt(i);
     
      if (bac.isBalancingRequired(fo))
      {
        // reset the the just-done span area in preparation
        // for a backtrack for balancing
        bac.resetSpanArea();
       
        this.rollback(markerSnapshot);
        // one less because of the "continue"
        i = this.marker - 1;
        continue;
      }
      // current column area
      Area currentArea = bac.getNextArea(fo);
      // temporary hack for IDReferences
      currentArea.setIDReferences(bac.getIDReferences());
      if (bac.isNewSpanArea())
      {
        this.marker = i;
        markerSnapshot = this.getMarkerSnapshot(new Vector());
      }
     
      _status = fo.layout(currentArea);
      if (_status.isIncomplete()) {
        if ((prevChildMustKeepWithNext) && (_status.laidOutNone())) {
          this.marker = i - 1;
          FObj prevChild = (FObj) children.elementAt(this.marker);
          prevChild.removeAreas();
          prevChild.resetMarker();
          prevChild.removeID(area.getIDReferences());
          _status = new Status(Status.AREA_FULL_SOME);
          return _status;
          // should probably return AREA_FULL_NONE if first
          // or perhaps an entirely new status code
        }
        if (bac.isLastColumn())
          if (_status.getCode() == Status.FORCE_COLUMN_BREAK) {
            this.marker = i;
            _status = new Status(Status.FORCE_PAGE_BREAK)// same thing
            return _status;
          }
View Full Code Here

Examples of org.apache.fop.layout.BodyAreaContainer

            ((currentPageNumber % 2) == 0) )
            {
            }
            else
            {
                BodyAreaContainer bodyArea = currentPage.getBody();
                bodyArea.setIDReferences(areaTree.getIDReferences());
   
    Flow flow = getCurrentFlow(RegionBody.REGION_CLASS);
   
    if (null == flow) {
         MessageHandler.errorln("No flow found for region-body "
View Full Code Here

Examples of org.apache.fop.layout.BodyAreaContainer

            if ((status.getCode() == Status.FORCE_PAGE_BREAK_EVEN)
                && ((currentPageNumber % 2) == 1)) {}
            else if ((status.getCode() == Status.FORCE_PAGE_BREAK_ODD)
                 && ((currentPageNumber % 2) == 0)) {}
            else {
                BodyAreaContainer bodyArea = currentPage.getBody();
                bodyArea.setIDReferences(areaTree.getIDReferences());

                Flow flow = getCurrentFlow(RegionBody.REGION_CLASS);

                if (null == flow) {
                    MessageHandler.errorln("No flow found for region-body "
View Full Code Here

Examples of org.apache.fop.layout.BodyAreaContainer

        if (this.marker == START) {
            this.marker = 0;
        }

        // flow is *always* laid out into a BodyAreaContainer
        BodyAreaContainer bac = (BodyAreaContainer)area;

        boolean prevChildMustKeepWithNext = false;
        Vector pageMarker = this.getMarkerSnapshot(new Vector());

        int numChildren = this.children.size();
        if (numChildren == 0) {
            throw new FOPException("fo:flow must contain block-level children");
        }
        for (int i = this.marker; i < numChildren; i++) {
            FObj fo = (FObj)children.elementAt(i);

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

                this.rollback(markerSnapshot);
                // one less because of the "continue"
                i = this.marker - 1;
                continue;
            }
            // current column area
            Area currentArea = bac.getNextArea(fo);
            // temporary hack for IDReferences
            currentArea.setIDReferences(bac.getIDReferences());
            if (bac.isNewSpanArea()) {
                this.marker = i;
                markerSnapshot = this.getMarkerSnapshot(new Vector());
            }

            _status = fo.layout(currentArea);

            /*
             * if((_status.isPageBreak() || i == numChildren - 1) && bac.needsFootnoteAdjusting()) {
             * bac.adjustFootnoteArea();
             * this.rollback(pageMarker);
             * i = this.marker - 1;
             * Area mainReferenceArea = bac.getMainReferenceArea();
             * // remove areas
             * continue;
             * }
             */
            if (_status.isIncomplete()) {
                if ((prevChildMustKeepWithNext) && (_status.laidOutNone())) {
                    this.marker = i - 1;
                    FObj prevChild = (FObj)children.elementAt(this.marker);
                    prevChild.removeAreas();
                    prevChild.resetMarker();
                    prevChild.removeID(area.getIDReferences());
                    _status = new Status(Status.AREA_FULL_SOME);
                    return _status;
                    // should probably return AREA_FULL_NONE if first
                    // or perhaps an entirely new status code
                }
                if (bac.isLastColumn())
                    if (_status.getCode() == Status.FORCE_COLUMN_BREAK) {
                        this.marker = i;
                        _status =
                            new Status(Status.FORCE_PAGE_BREAK);    // same thing
                        return _status;
View Full Code Here

Examples of org.apache.fop.layout.BodyAreaContainer

            if ((status.getCode() == Status.FORCE_PAGE_BREAK_EVEN)
                && ((currentPageNumber % 2) == 1)) {}
            else if ((status.getCode() == Status.FORCE_PAGE_BREAK_ODD)
                 && ((currentPageNumber % 2) == 0)) {}
            else {
                BodyAreaContainer bodyArea = currentPage.getBody();
                bodyArea.setIDReferences(areaTree.getIDReferences());

                Flow flow = getCurrentFlow(RegionBody.REGION_CLASS);

                if (null == flow) {
                    log.error("No flow found for region-body "
View Full Code Here

Examples of org.apache.fop.layout.BodyAreaContainer

        if (this.marker == START) {
            this.marker = 0;
        }

        // flow is *always* laid out into a BodyAreaContainer
        BodyAreaContainer bac = (BodyAreaContainer)area;

        boolean prevChildMustKeepWithNext = false;
        Vector pageMarker = this.getMarkerSnapshot(new Vector());

        int numChildren = this.children.size();
        if (numChildren == 0) {
            throw new FOPException("fo:flow must contain block-level children");
        }
        for (int i = this.marker; i < numChildren; i++) {
            FObj fo = (FObj)children.elementAt(i);

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

                this.rollback(markerSnapshot);
                // one less because of the "continue"
                i = this.marker - 1;
                continue;
            }
            // current column area
            Area currentArea = bac.getNextArea(fo);
            // temporary hack for IDReferences
            currentArea.setIDReferences(bac.getIDReferences());
            if (bac.isNewSpanArea()) {
                this.marker = i;
                markerSnapshot = this.getMarkerSnapshot(new Vector());
            }

            _status = fo.layout(currentArea);

            /*
             * if((_status.isPageBreak() || i == numChildren - 1) && bac.needsFootnoteAdjusting()) {
             * bac.adjustFootnoteArea();
             * this.rollback(pageMarker);
             * i = this.marker - 1;
             * Area mainReferenceArea = bac.getMainReferenceArea();
             * // remove areas
             * continue;
             * }
             */
            if (_status.isIncomplete()) {
                if ((prevChildMustKeepWithNext) && (_status.laidOutNone())) {
                    this.marker = i - 1;
                    FObj prevChild = (FObj)children.elementAt(this.marker);
                    prevChild.removeAreas();
                    prevChild.resetMarker();
                    prevChild.removeID(area.getIDReferences());
                    _status = new Status(Status.AREA_FULL_SOME);
                    return _status;
                    // should probably return AREA_FULL_NONE if first
                    // or perhaps an entirely new status code
                }
                if (bac.isLastColumn())
                    if (_status.getCode() == Status.FORCE_COLUMN_BREAK) {
                        this.marker = i;
                        _status =
                            new Status(Status.FORCE_PAGE_BREAK);    // same thing
                        return _status;
View Full Code Here

Examples of org.apache.fop.layout.BodyAreaContainer

            ((currentPageNumber % 2) == 0) )
            {
            }
            else
            {
                BodyAreaContainer bodyArea = currentPage.getBody();
                bodyArea.setIDReferences(areaTree.getIDReferences());
   
    Flow flow = getCurrentFlow(RegionBody.REGION_CLASS);
   
    if (null == flow) {
         MessageHandler.errorln("No flow found for region-body "
View Full Code Here

Examples of org.apache.fop.layout.BodyAreaContainer

          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
View Full Code Here

Examples of org.apache.fop.layout.BodyAreaContainer

        if (this.marker == START) {
            this.marker = 0;
        }

        // flow is *always* laid out into a BodyAreaContainer
        BodyAreaContainer bac = (BodyAreaContainer)area;

        boolean prevChildMustKeepWithNext = false;
        ArrayList pageMarker = this.getMarkerSnapshot(new ArrayList());

        int numChildren = this.children.size();
        if (numChildren == 0) {
            throw new FOPException("fo:flow must contain block-level children",
                                   systemId, line, column);
        }
        for (int i = this.marker; i < numChildren; i++) {
            FObj fo = (FObj)children.get(i);

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

                this.rollback(markerSnapshot);
                // one less because of the "continue"
                i = this.marker - 1;
                continue;
            }
            // current column area
            Area currentArea = bac.getNextArea(fo);
            // temporary hack for IDReferences
            currentArea.setIDReferences(bac.getIDReferences());
            if (bac.isNewSpanArea()) {
                this.marker = i;
                markerSnapshot = this.getMarkerSnapshot(new ArrayList());
            }
            // Set current content width for percent-based lengths in children
            setContentWidth(currentArea.getContentWidth());

            _status = fo.layout(currentArea);

            /*
             * if((_status.isPageBreak() || i == numChildren - 1) && bac.needsFootnoteAdjusting()) {
             * bac.adjustFootnoteArea();
             * this.rollback(pageMarker);
             * i = this.marker - 1;
             * Area mainReferenceArea = bac.getMainReferenceArea();
             * // remove areas
             * continue;
             * }
             */
            if (Status.isIncomplete(_status)) {
                if ((prevChildMustKeepWithNext) && (Status.laidOutNone(_status))) {
                    this.marker = i - 1;
                    FObj prevChild = (FObj)children.get(this.marker);
                    prevChild.removeAreas();
                    prevChild.resetMarker();
                    prevChild.removeID(area.getIDReferences());
                    _status = Status.AREA_FULL_SOME;
                    return _status;
                    // should probably return AREA_FULL_NONE if first
                    // or perhaps an entirely new status code
                }
                if (bac.isLastColumn())
                    if (_status == Status.FORCE_COLUMN_BREAK) {
                        this.marker = i;
                        _status = Status.FORCE_PAGE_BREAK;    // same thing
                        return _status;
                    } else {
View Full Code Here

Examples of org.apache.fop.layout.BodyAreaContainer

    if (this.marker == START) {
      this.marker = 0;
    }
 
    // flow is *always* laid out into a BodyAreaContainer
    BodyAreaContainer bac = (BodyAreaContainer)area;

    boolean prevChildMustKeepWithNext = false;
    Vector pageMarker = this.getMarkerSnapshot(new Vector());

    int numChildren = this.children.size();
    if (numChildren == 0)
    {
      throw new FOPException("fo:flow must contain block-level children");
    }
    for (int i = this.marker; i < numChildren; i++) {
      FObj fo = (FObj) children.elementAt(i);

      if (bac.isBalancingRequired(fo))
      {
        // reset the the just-done span area in preparation
        // for a backtrack for balancing
        bac.resetSpanArea();
       
        this.rollback(markerSnapshot);
        // one less because of the "continue"
        i = this.marker - 1;
        continue;
      }
      // current column area
      Area currentArea = bac.getNextArea(fo);
      // temporary hack for IDReferences
      currentArea.setIDReferences(bac.getIDReferences());
      if (bac.isNewSpanArea())
      {
        this.marker = i;
        markerSnapshot = this.getMarkerSnapshot(new Vector());
      }
     
      _status = fo.layout(currentArea);

/*        if((_status.isPageBreak() || i == numChildren - 1) && bac.needsFootnoteAdjusting()) {
            bac.adjustFootnoteArea();
            this.rollback(pageMarker);
            i = this.marker - 1;
            Area mainReferenceArea = bac.getMainReferenceArea();
            // remove areas
            continue;
        }*/
      if (_status.isIncomplete()) {
        if ((prevChildMustKeepWithNext) && (_status.laidOutNone())) {
          this.marker = i - 1;
          FObj prevChild = (FObj) children.elementAt(this.marker);
          prevChild.removeAreas();
          prevChild.resetMarker();
          prevChild.removeID(area.getIDReferences());
          _status = new Status(Status.AREA_FULL_SOME);
          return _status;
          // should probably return AREA_FULL_NONE if first
          // or perhaps an entirely new status code
        }
        if (bac.isLastColumn())
          if (_status.getCode() == Status.FORCE_COLUMN_BREAK) {
            this.marker = i;
            _status = new Status(Status.FORCE_PAGE_BREAK)// same thing
            return _status;
          }
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.