aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/layout/BlockArea.java
diff options
context:
space:
mode:
authorTore Engvig <tore@apache.org>2001-07-30 20:29:35 +0000
committerTore Engvig <tore@apache.org>2001-07-30 20:29:35 +0000
commite0edd215721150e6c04ac49706622d6189cb0b42 (patch)
tree6b59b872d9c0e93f99316ea2f421209b71a97755 /src/org/apache/fop/layout/BlockArea.java
parenteb57915dec9bcd907e495595efac60dbf3579ad8 (diff)
downloadxmlgraphics-fop-e0edd215721150e6c04ac49706622d6189cb0b42.tar.gz
xmlgraphics-fop-e0edd215721150e6c04ac49706622d6189cb0b42.zip
Formatted code according to code standards.
Changed license to use short license. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194380 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/layout/BlockArea.java')
-rw-r--r--src/org/apache/fop/layout/BlockArea.java41
1 files changed, 23 insertions, 18 deletions
diff --git a/src/org/apache/fop/layout/BlockArea.java b/src/org/apache/fop/layout/BlockArea.java
index 891a7cfde..44f6f0c22 100644
--- a/src/org/apache/fop/layout/BlockArea.java
+++ b/src/org/apache/fop/layout/BlockArea.java
@@ -1,4 +1,5 @@
-/* $Id$
+/*
+ * $Id$
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
@@ -54,21 +55,21 @@ public class BlockArea extends Area {
/* have any line areas been used? */
protected boolean hasLines = false;
- /*hyphenation*/
+ /* hyphenation */
protected HyphenationProps hyphProps;
protected Vector pendingFootnotes = null;
- public BlockArea(FontState fontState, int allocationWidth,
- int maxHeight, int startIndent, int endIndent,
- int textIndent, int align, int alignLastLine, int lineHeight) {
+ public BlockArea(FontState fontState, int allocationWidth, int maxHeight,
+ int startIndent, int endIndent, int textIndent,
+ int align, int alignLastLine, int lineHeight) {
super(fontState, allocationWidth, maxHeight);
this.startIndent = startIndent;
this.endIndent = endIndent;
this.textIndent = textIndent;
- this.contentRectangleWidth =
- allocationWidth - startIndent - endIndent;
+ this.contentRectangleWidth = allocationWidth - startIndent
+ - endIndent;
this.align = align;
this.alignLastLine = alignLastLine;
this.lineHeight = lineHeight;
@@ -101,8 +102,8 @@ public class BlockArea extends Area {
// add pending footnotes
if (pendingFootnotes != null) {
for (Enumeration e = pendingFootnotes.elements();
- e.hasMoreElements();) {
- FootnoteBody fb = (FootnoteBody) e.nextElement();
+ e.hasMoreElements(); ) {
+ FootnoteBody fb = (FootnoteBody)e.nextElement();
Page page = getPage();
if (!Footnote.layoutFootnote(page, fb, this)) {
page.addPendingFootnote(fb);
@@ -122,7 +123,7 @@ public class BlockArea extends Area {
* @return the line area to be used to add inlie objects
*/
public LineArea getCurrentLineArea() {
- if (currentHeight + lineHeight > maxHeight) {
+ if (currentHeight + lineHeight > maxHeight) {
return null;
}
this.currentLineArea.changeHyphenation(hyphProps);
@@ -145,9 +146,10 @@ public class BlockArea extends Area {
this.currentLineArea.align(this.align);
this.addLineArea(this.currentLineArea);
}
- this.currentLineArea =
- new LineArea(fontState, lineHeight, halfLeading,
- allocationWidth, startIndent, endIndent, currentLineArea);
+ this.currentLineArea = new LineArea(fontState, lineHeight,
+ halfLeading, allocationWidth,
+ startIndent, endIndent,
+ currentLineArea);
this.currentLineArea.changeHyphenation(hyphProps);
if (currentHeight + lineHeight > maxHeight) {
return null;
@@ -177,7 +179,9 @@ public class BlockArea extends Area {
public void start() {
currentLineArea = new LineArea(fontState, lineHeight, halfLeading,
- allocationWidth, startIndent + textIndent, endIndent, null);
+ allocationWidth,
+ startIndent + textIndent, endIndent,
+ null);
}
public int getEndIndent() {
@@ -186,15 +190,15 @@ public class BlockArea extends Area {
// KL: I think we should just return startIndent here!
public int getStartIndent() {
- //return startIndent + paddingLeft + borderWidthLeft;
- return startIndent ;
+ // return startIndent + paddingLeft + borderWidthLeft;
+ return startIndent;
}
public void setIndents(int startIndent, int endIndent) {
this.startIndent = startIndent;
this.endIndent = endIndent;
- this.contentRectangleWidth =
- allocationWidth - startIndent - endIndent;
+ this.contentRectangleWidth = allocationWidth - startIndent
+ - endIndent;
}
public int spaceLeft() {
@@ -215,4 +219,5 @@ public class BlockArea extends Area {
}
pendingFootnotes.addElement(fb);
}
+
}