Package org.apache.fop.fo.flow

Examples of org.apache.fop.fo.flow.Flow


            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 "
              + "in page-master '" + currentPageMasterName + "'");
        break;
       
    }
    else {
        status = flow.layout(bodyArea);
    }
   
            }
            MessageHandler.log("]");
            areaTree.addPage(currentPage);
View Full Code Here


  throws FOPException
    {
  SimplePageMaster simpleMaster = getCurrentSimplePageMaster();

  if (simpleMaster.getRegion(RegionBefore.REGION_CLASS) != null && (currentPage.getBefore() != null)) {
      Flow staticFlow = (Flow)_flowMap.get(simpleMaster.getRegion(RegionBefore.REGION_CLASS).getRegionName());
      if (staticFlow != null) {
    AreaContainer beforeArea = currentPage.getBefore();
    beforeArea.setIDReferences(areaTree.getIDReferences());
    layoutStaticContent(staticFlow, simpleMaster.getRegion(RegionBefore.REGION_CLASS),
            beforeArea);
      }
  }

  if (simpleMaster.getRegion(RegionAfter.REGION_CLASS) != null && (currentPage.getAfter() != null)) {
      Flow staticFlow = (Flow)_flowMap.get(simpleMaster.getRegion(RegionAfter.REGION_CLASS).getRegionName());
      if (staticFlow != null) {
    AreaContainer afterArea = currentPage.getAfter();
    afterArea.setIDReferences(areaTree.getIDReferences());
    layoutStaticContent(staticFlow, simpleMaster.getRegion(RegionAfter.REGION_CLASS),
            afterArea);
View Full Code Here

    private boolean flowsAreIncomplete()
    {
  boolean isIncomplete = false;

  for (Enumeration e = _flowMap.elements(); e.hasMoreElements(); ) {
      Flow flow = (Flow)e.nextElement();
      if (flow instanceof StaticContent) {
    continue;
      }
     
      Status status = flow.getStatus();
      isIncomplete |= status.isIncomplete();
  }
  return isIncomplete;
    }
View Full Code Here

     */
    private Flow getCurrentFlow(String regionClass)
    {
  Region region = getCurrentSimplePageMaster().getRegion(regionClass);
        if (region != null) {
      Flow flow = (Flow)_flowMap.get(region.getRegionName());
      return flow;
     
  }
  else {
     
View Full Code Here

   
      SimplePageMaster spm = this.layoutMasterSet.getSimplePageMaster( masterName );
      Region region = spm.getRegion(RegionBody.REGION_CLASS);
     
     
      Flow flow = (Flow)_flowMap.get( region.getRegionName() );
      if ((null == flow) || flow.getStatus().isIncomplete())
    return false;
      else
    return true;
  }
  return false;
View Full Code Here

                 && ((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 "
                                           + "in page-master '"
                                           + currentPageMasterName + "'");
                    break;

                } else {
                    status = flow.layout(bodyArea);
                }

            }

            // because of markers, do after fo:flow (likely also
View Full Code Here

    private void formatStaticContent(AreaTree areaTree) throws FOPException {
        SimplePageMaster simpleMaster = getCurrentSimplePageMaster();

        if (simpleMaster.getRegion(RegionBefore.REGION_CLASS) != null
                && (currentPage.getBefore() != null)) {
            Flow staticFlow =
                (Flow)_flowMap.get(simpleMaster.getRegion(RegionBefore.REGION_CLASS).getRegionName());
            if (staticFlow != null) {
                AreaContainer beforeArea = currentPage.getBefore();
                beforeArea.setIDReferences(areaTree.getIDReferences());
                layoutStaticContent(staticFlow,
                                    simpleMaster.getRegion(RegionBefore.REGION_CLASS),
                                    beforeArea);
            }
        }

        if (simpleMaster.getRegion(RegionAfter.REGION_CLASS) != null
                && (currentPage.getAfter() != null)) {
            Flow staticFlow =
                (Flow)_flowMap.get(simpleMaster.getRegion(RegionAfter.REGION_CLASS).getRegionName());
            if (staticFlow != null) {
                AreaContainer afterArea = currentPage.getAfter();
                afterArea.setIDReferences(areaTree.getIDReferences());
                layoutStaticContent(staticFlow,
                                    simpleMaster.getRegion(RegionAfter.REGION_CLASS),
                                    afterArea);
            }
        }

        if (simpleMaster.getRegion(RegionStart.REGION_CLASS) != null
                && (currentPage.getStart() != null)) {
            Flow staticFlow =
                (Flow)_flowMap.get(simpleMaster.getRegion(RegionStart.REGION_CLASS).getRegionName());
            if (staticFlow != null) {
                AreaContainer startArea = currentPage.getStart();
                startArea.setIDReferences(areaTree.getIDReferences());
                layoutStaticContent(staticFlow,
                                    simpleMaster.getRegion(RegionStart.REGION_CLASS),
                                    startArea);
            }
        }

        if (simpleMaster.getRegion(RegionEnd.REGION_CLASS) != null
                && (currentPage.getEnd() != null)) {
            Flow staticFlow =
                (Flow)_flowMap.get(simpleMaster.getRegion(RegionEnd.REGION_CLASS).getRegionName());
            if (staticFlow != null) {
                AreaContainer endArea = currentPage.getEnd();
                endArea.setIDReferences(areaTree.getIDReferences());
                layoutStaticContent(staticFlow,
View Full Code Here

     */
    private boolean flowsAreIncomplete() {
        boolean isIncomplete = false;

        for (Enumeration e = _flowMap.elements(); e.hasMoreElements(); ) {
            Flow flow = (Flow)e.nextElement();
            if (flow instanceof StaticContent) {
                continue;
            }

            Status status = flow.getStatus();
            isIncomplete |= status.isIncomplete();
        }
        return isIncomplete;
    }
View Full Code Here

     * page master.
     */
    private Flow getCurrentFlow(String regionClass) {
        Region region = getCurrentSimplePageMaster().getRegion(regionClass);
        if (region != null) {
            Flow flow = (Flow)_flowMap.get(region.getRegionName());
            return flow;

        } else {

            System.out.println("flow is null. regionClass = '" + regionClass
View Full Code Here

            SimplePageMaster spm =
                this.layoutMasterSet.getSimplePageMaster(masterName);
            Region region = spm.getRegion(RegionBody.REGION_CLASS);


            Flow flow = (Flow)_flowMap.get(region.getRegionName());
            if ((null == flow) || flow.getStatus().isIncomplete())
                return false;
            else
                return true;
        }
        return false;
View Full Code Here

TOP

Related Classes of org.apache.fop.fo.flow.Flow

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.