import org.apache.fop.fo.FObj;
import org.apache.fop.fo.PropertyList;
import org.apache.fop.fo.properties.Overflow;
+import org.apache.fop.datatypes.ColorType;
import org.apache.fop.apps.FOPException;
import org.apache.fop.layout.RegionArea;
import org.apache.fop.layout.BodyRegionArea;
public static final String REGION_CLASS = "body";
+ ColorType backgroundColor;
protected RegionBody(FObj parent, PropertyList propertyList)
throws FOPException
super(parent, propertyList);
}
-
RegionArea makeRegionArea(int allocationRectangleXPosition,
int allocationRectangleYPosition,
int allocationRectangleWidth,
int marginLeft = this.properties.get("margin-left").getLength().mvalue();
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 -
int columnGap = this.properties.get("column-gap").getLength().mvalue();
body.setColumnGap(columnGap);
+ body.setBackgroundColor(backgroundColor);
+
return body;
}
*/
package org.apache.fop.layout;
import org.apache.fop.fo.properties.*;
+import org.apache.fop.datatypes.ColorType;
public class RegionArea {
protected int width;
protected int height;
+ protected ColorType backgroundColor;
+
public RegionArea(int xPosition, int yPosition, int width, int height) {
this.xPosition = xPosition;
this.yPosition = yPosition;
public AreaContainer makeAreaContainer() {
return new AreaContainer(null, xPosition, yPosition, width, height, Position.ABSOLUTE);
}
+
+ public ColorType getBackgroundColor() {
+ return this.backgroundColor;
+ }
+
+ public void setBackgroundColor(ColorType bgColor) {
+ this.backgroundColor = bgColor;
+ }
+
}