aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/layout/BlockArea.java
diff options
context:
space:
mode:
authorfotis <fotis@unknown>2000-03-07 09:47:35 +0000
committerfotis <fotis@unknown>2000-03-07 09:47:35 +0000
commit5e545d73c8c069df21aa55d45766442a3f4c2fae (patch)
treee641bfb80b05beade6dc02c6c16bd17661be5e65 /src/org/apache/fop/layout/BlockArea.java
parent99aca1e1efffb3e2824ba70454a51f6a9fb83336 (diff)
downloadxmlgraphics-fop-5e545d73c8c069df21aa55d45766442a3f4c2fae.tar.gz
xmlgraphics-fop-5e545d73c8c069df21aa55d45766442a3f4c2fae.zip
Support for absolute positioning and borders (contributed by Jon Smirl)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193285 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/layout/BlockArea.java')
-rw-r--r--src/org/apache/fop/layout/BlockArea.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/org/apache/fop/layout/BlockArea.java b/src/org/apache/fop/layout/BlockArea.java
index 2532e9567..9cd8b98ca 100644
--- a/src/org/apache/fop/layout/BlockArea.java
+++ b/src/org/apache/fop/layout/BlockArea.java
@@ -95,7 +95,8 @@ public class BlockArea extends Area {
this.alignLastLine = alignLastLine;
this.lineHeight = lineHeight;
- this.halfLeading = (lineHeight - fontState.getFontSize())/2;
+ if (fontState != null)
+ this.halfLeading = (lineHeight - fontState.getFontSize())/2;
}
public void render(Renderer renderer) {
@@ -182,9 +183,15 @@ public class BlockArea extends Area {
}
public int getStartIndent() {
- return startIndent;
+ return startIndent + paddingLeft + borderWidthLeft;
}
+ public void setIndents(int startIndent, int endIndent) {
+ this.startIndent = startIndent;
+ this.endIndent = endIndent;
+ this.contentRectangleWidth = allocationWidth - startIndent - endIndent;
+ }
+
public int spaceLeft() {
return maxHeight - currentHeight;
}