Examples of BodyRegionArea


Examples of org.apache.fop.layout.BodyRegionArea

        // this.properties.get("writing-mode");

        this.backgroundColor =
            this.properties.get("background-color").getColorType();

        BodyRegionArea body = new BodyRegionArea(allocationRectangleXPosition
                                                 + mProps.marginLeft,
                                                 allocationRectangleYPosition
                                                 - mProps.marginTop,
                                                 allocationRectangleWidth
                                                 - mProps.marginLeft
                                                 - mProps.marginRight,
                                                 allocationRectangleHeight
                                                 - mProps.marginTop
                                                 - mProps.marginBottom);

        int overflow = this.properties.get("overflow").getEnum();
        String columnCountAsString =
            this.properties.get("column-count").getString();
        int columnCount = 1;
        try {
            columnCount = Integer.parseInt(columnCountAsString);
        } catch (NumberFormatException nfe) {
            MessageHandler.errorln("Bad value on region body 'column-count'");
            columnCount = 1;
        }
        if ((columnCount > 1) && (overflow == Overflow.SCROLL)) {
            // recover by setting 'column-count' to 1. This is allowed but
            // not required by the spec.
            MessageHandler.errorln("Setting 'column-count' to 1 because "
                                   + "'overflow' is set to 'scroll'");
            columnCount = 1;
        }
        body.setColumnCount(columnCount);

        int columnGap =
            this.properties.get("column-gap").getLength().mvalue();
        body.setColumnGap(columnGap);

        body.setBackgroundColor(backgroundColor);

        return body;
    }
View Full Code Here

Examples of org.apache.fop.layout.BodyRegionArea

        int contentRectangleHeight = pageHeight - mProps.marginTop
                                     - mProps.marginBottom;

        this.pageMaster = new PageMaster(pageWidth, pageHeight);
        if (getRegion(RegionBody.REGION_CLASS) != null) {
            BodyRegionArea body =
                (BodyRegionArea)getRegion(RegionBody.REGION_CLASS).makeRegionArea(contentRectangleXPosition,
                                          contentRectangleYPosition,
                                          contentRectangleWidth,
                                          contentRectangleHeight);
            this.pageMaster.addBody(body);
View Full Code Here

Examples of org.apache.fop.layout.BodyRegionArea

        // this.properties.get("writing-mode");

        this.backgroundColor =
            this.properties.get("background-color").getColorType();

        BodyRegionArea body = new BodyRegionArea(allocationRectangleXPosition
                                                 + mProps.marginLeft,
                                                 allocationRectangleYPosition
                                                 - mProps.marginTop,
                                                 allocationRectangleWidth
                                                 - mProps.marginLeft
                                                 - mProps.marginRight,
                                                 allocationRectangleHeight
                                                 - mProps.marginTop
                                                 - mProps.marginBottom);

        int overflow = this.properties.get("overflow").getEnum();
        String columnCountAsString =
            this.properties.get("column-count").getString();
        int columnCount = 1;
        try {
            columnCount = Integer.parseInt(columnCountAsString);
        } catch (NumberFormatException nfe) {
            log.error("Bad value on region body 'column-count'");
            columnCount = 1;
        }
        if ((columnCount > 1) && (overflow == Overflow.SCROLL)) {
            // recover by setting 'column-count' to 1. This is allowed but
            // not required by the spec.
            log.error("Setting 'column-count' to 1 because "
                                   + "'overflow' is set to 'scroll'");
            columnCount = 1;
        }
        body.setColumnCount(columnCount);

        int columnGap =
            this.properties.get("column-gap").getLength().mvalue();
        body.setColumnGap(columnGap);

        body.setBackgroundColor(backgroundColor);

        return body;
    }
View Full Code Here

Examples of org.apache.fop.layout.BodyRegionArea

        int contentRectangleHeight = pageHeight - mProps.marginTop
                                     - mProps.marginBottom;

        this.pageMaster = new PageMaster(pageWidth, pageHeight);
        if (getRegion(RegionBody.REGION_CLASS) != null) {
            BodyRegionArea body =
                (BodyRegionArea)getRegion(RegionBody.REGION_CLASS).makeRegionArea(contentRectangleXPosition,
                                          contentRectangleYPosition,
                                          contentRectangleWidth,
                                          contentRectangleHeight);
            this.pageMaster.addBody(body);
View Full Code Here

Examples of org.apache.fop.layout.BodyRegionArea

        // this.properties.get("display-align");
        // this.properties.get("region-name");
        // this.properties.get("reference-orientation");
        // this.properties.get("writing-mode");

        BodyRegionArea body = new BodyRegionArea(allocationRectangleXPosition
                                                 + mProps.marginLeft,
                                                 allocationRectangleYPosition
                                                 - mProps.marginTop,
                                                 allocationRectangleWidth
                                                 - mProps.marginLeft
                                                 - mProps.marginRight,
                                                 allocationRectangleHeight
                                                 - mProps.marginTop
                                                 - mProps.marginBottom);

        body.setBackground(propMgr.getBackgroundProps());

        int overflow = this.properties.get("overflow").getEnum();
        String columnCountAsString =
            this.properties.get("column-count").getString();
        int columnCount = 1;
        try {
            if( columnCountAsString.charAt(0) >= '0' && columnCountAsString.charAt(0)<= '9') {
                columnCount = Integer.parseInt(columnCountAsString);
            } else {
                log.error("Bad value on region body 'column-count'");
            }
        } catch (NumberFormatException nfe) {
            log.error("Bad value on region body 'column-count'");
            columnCount = 1;
        }
        if ((columnCount > 1) && (overflow == Overflow.SCROLL)) {
            // recover by setting 'column-count' to 1. This is allowed but
            // not required by the spec.
            log.error("Setting 'column-count' to 1 because "
                                   + "'overflow' is set to 'scroll'");
            columnCount = 1;
        }
        body.setColumnCount(columnCount);

        int columnGap =
            this.properties.get("column-gap").getLength().mvalue();
        body.setColumnGap(columnGap);

        return body;
    }
View Full Code Here

Examples of org.apache.fop.layout.BodyRegionArea

  int contentRectangleWidth = pageWidth - marginLeft - marginRight;
  int contentRectangleHeight = pageHeight - marginTop - marginBottom;
   
  this.pageMaster = new PageMaster(pageWidth, pageHeight);
  if (getRegion(RegionBody.REGION_CLASS) != null) {
    BodyRegionArea body =
    (BodyRegionArea)getRegion(RegionBody.REGION_CLASS).makeRegionArea(contentRectangleXPosition,
      contentRectangleYPosition,contentRectangleWidth,contentRectangleHeight);
      this.pageMaster.addBody(body);
  }
  else {
View Full Code Here

Examples of org.apache.fop.layout.BodyRegionArea

    int marginRight = this.properties.get("margin-right").getLength().mvalue();

            this.backgroundColor = this.properties.get(
                                     "background-color").getColorType();

    BodyRegionArea body = new BodyRegionArea(allocationRectangleXPosition + marginLeft,
        allocationRectangleYPosition - marginTop,
        allocationRectangleWidth - marginLeft -
        marginRight, allocationRectangleHeight -
        marginTop - marginBottom);
       
    int overflow = this.properties.get("overflow").getEnum();
    String columnCountAsString = this.properties.get("column-count").getString();
    int columnCount = 1;
    try
    {
      columnCount = Integer.parseInt(columnCountAsString);
    }
    catch (NumberFormatException nfe)
    {
      MessageHandler.errorln("Bad value on region body 'column-count'");
      columnCount = 1;
    }
    if ((columnCount > 1) && (overflow == Overflow.SCROLL))
    {
      // recover by setting 'column-count' to 1. This is allowed but
      // not required by the spec.
      MessageHandler.errorln("Setting 'column-count' to 1 because "
        + "'overflow' is set to 'scroll'");
      columnCount = 1;
    }
    body.setColumnCount(columnCount);
   
    int columnGap = this.properties.get("column-gap").getLength().mvalue();
    body.setColumnGap(columnGap);
   
        body.setBackgroundColor(backgroundColor);

    return body;
    }
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.