aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/fo/flow/TableRow.java
diff options
context:
space:
mode:
authorSteve Coffman <gears@apache.org>2000-11-08 22:07:27 +0000
committerSteve Coffman <gears@apache.org>2000-11-08 22:07:27 +0000
commit641d55aa6dd3206d1471734a99675c65ed890b51 (patch)
tree2f842a36ee3d596151a3428e2e077fcdb91fae14 /src/org/apache/fop/fo/flow/TableRow.java
parentf7a79ddfc29bdc593213d20e176387a12550046b (diff)
downloadxmlgraphics-fop-641d55aa6dd3206d1471734a99675c65ed890b51.tar.gz
xmlgraphics-fop-641d55aa6dd3206d1471734a99675c65ed890b51.zip
Corinna Hischke's excellent table padding and partial border fixes. Very
Cool! git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193751 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/fo/flow/TableRow.java')
-rw-r--r--src/org/apache/fop/fo/flow/TableRow.java27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/org/apache/fop/fo/flow/TableRow.java b/src/org/apache/fop/fo/flow/TableRow.java
index 7ee6edb6f..af4d03176 100644
--- a/src/org/apache/fop/fo/flow/TableRow.java
+++ b/src/org/apache/fop/fo/flow/TableRow.java
@@ -93,6 +93,10 @@ public class TableRow extends FObj {
ColorType borderRightColor;
int borderRightWidth;
int borderRightStyle;
+ int paddingTop;
+ int paddingBottom;
+ int paddingLeft;
+ int paddingRight;
int widthOfCellsSoFar = 0;
int largestCellHeight = 0;
@@ -178,6 +182,21 @@ public class TableRow extends FObj {
this.borderRightStyle =
this.properties.get("border-right-style").getEnum();
}
+ this.paddingTop =
+ this.properties.get("padding").getLength().mvalue();
+ this.paddingLeft = this.paddingTop;
+ this.paddingRight = this.paddingTop;
+ this.paddingBottom = this.paddingTop;
+ if (this.paddingTop == 0) {
+ this.paddingTop =
+ this.properties.get("padding-top").getLength().mvalue();
+ this.paddingLeft =
+ this.properties.get("padding-left").getLength().mvalue();
+ this.paddingBottom =
+ this.properties.get("padding-bottom").getLength().mvalue();
+ this.paddingRight =
+ this.properties.get("padding-right").getLength().mvalue();
+ }
this.id=
this.properties.get("id").getString();
@@ -205,6 +224,8 @@ public class TableRow extends FObj {
area.getAllocationWidth(),
area.spaceLeft(), Position.RELATIVE);
areaContainer.setPage(area.getPage());
+ areaContainer.setPadding(paddingTop, paddingLeft, paddingBottom,
+ paddingRight);
areaContainer.setBackgroundColor(backgroundColor);
areaContainer.setBorderStyle(borderTopStyle, borderLeftStyle, borderBottomStyle, borderRightStyle);
areaContainer.setBorderWidth(borderTopWidth, borderLeftWidth, borderBottomWidth, borderRightWidth);
@@ -265,7 +286,11 @@ public class TableRow extends FObj {
area.addChild(areaContainer);
areaContainer.end();
- area.addDisplaySpace(largestCellHeight);
+ area.addDisplaySpace(largestCellHeight
+ + areaContainer.getPaddingTop()
+ + areaContainer.borderWidthTop
+ + areaContainer.getPaddingBottom()
+ + areaContainer.borderWidthBottom);
// bug fix from Eric Schaeffer
//area.increaseHeight(largestCellHeight);