// 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;
}