aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache
diff options
context:
space:
mode:
authorKaren Lease <klease@apache.org>2000-12-16 21:55:53 +0000
committerKaren Lease <klease@apache.org>2000-12-16 21:55:53 +0000
commit0368d11ef81d15428c1943b3d9d73b2598286d4b (patch)
tree24339c179dc52bcc07a0332ca762fb18a436a80a /src/org/apache
parente01b2f6990807ca1ffa657ef835fa82fb76d182a (diff)
downloadxmlgraphics-fop-0368d11ef81d15428c1943b3d9d73b2598286d4b.tar.gz
xmlgraphics-fop-0368d11ef81d15428c1943b3d9d73b2598286d4b.zip
Make getContentWidth method public
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193879 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache')
-rw-r--r--src/org/apache/fop/fo/flow/Block.java20
-rw-r--r--src/org/apache/fop/fo/flow/BlockContainer.java7
-rw-r--r--src/org/apache/fop/fo/flow/Flow.java2
-rw-r--r--src/org/apache/fop/fo/flow/Table.java2
-rw-r--r--src/org/apache/fop/fo/pagination/Region.java4
5 files changed, 23 insertions, 12 deletions
diff --git a/src/org/apache/fop/fo/flow/Block.java b/src/org/apache/fop/fo/flow/Block.java
index c2a4fe6fc..f5979d0eb 100644
--- a/src/org/apache/fop/fo/flow/Block.java
+++ b/src/org/apache/fop/fo/flow/Block.java
@@ -127,6 +127,7 @@ public class Block extends FObjMixed {
public Status layout(Area area) throws FOPException {
// MessageHandler.error(" b:LAY[" + marker + "] ");
+
if (this.marker == BREAK_AFTER) {
return new Status(Status.OK);
}
@@ -167,6 +168,7 @@ public class Block extends FObjMixed {
"background-color").getColorType();
this.paddingTop =
this.properties.get("padding").getLength().mvalue();
+
this.paddingLeft = this.paddingTop;
this.paddingRight = this.paddingTop;
this.paddingBottom = this.paddingTop;
@@ -334,6 +336,7 @@ public class Block extends FObjMixed {
blockArea.setIDReferences(area.getIDReferences());
blockArea.setTableCellXOffset(area.getTableCellXOffset());
+
int numChildren = this.children.size();
for (int i = this.marker; i < numChildren; i++) {
FONode fo = (FONode) children.elementAt(i);
@@ -426,13 +429,12 @@ public class Block extends FObjMixed {
}
- /**
- * Return the content width of the boxes generated by this FO.
- */
- protected int getContentWidth() {
- if (blockArea != null)
- return blockArea.getContentWidth(); //getAllocationWidth()??
- else
- return 0; // not laid out yet
- }
+ /**
+ * Return the content width of the boxes generated by this FO.
+ */
+ public int getContentWidth() {
+ if (blockArea != null)
+ return blockArea.getContentWidth(); //getAllocationWidth()??
+ else return 0; // not laid out yet
+ }
}
diff --git a/src/org/apache/fop/fo/flow/BlockContainer.java b/src/org/apache/fop/fo/flow/BlockContainer.java
index 04bbdad1e..77831b5e1 100644
--- a/src/org/apache/fop/fo/flow/BlockContainer.java
+++ b/src/org/apache/fop/fo/flow/BlockContainer.java
@@ -277,9 +277,14 @@ public class BlockContainer extends FObj {
* Return the content width of the boxes generated by this block
* container FO.
*/
- protected int getContentWidth() {
+ public int getContentWidth() {
if (areaContainer != null)
return areaContainer.getContentWidth(); //getAllocationWidth()??
else return 0; // not laid out yet
}
+
+ public boolean generatesReferenceAreas() {
+ return true;
+ }
+
}
diff --git a/src/org/apache/fop/fo/flow/Flow.java b/src/org/apache/fop/fo/flow/Flow.java
index 70b677979..ed3bad8a8 100644
--- a/src/org/apache/fop/fo/flow/Flow.java
+++ b/src/org/apache/fop/fo/flow/Flow.java
@@ -169,7 +169,7 @@ public class Flow extends FObj {
* Return the content width of this flow (really of the region
* in which it is flowing).
*/
- protected int getContentWidth() {
+ public int getContentWidth() {
if (area != null)
return area.getContentWidth(); //getAllocationWidth()??
else return 0; // not laid out yet
diff --git a/src/org/apache/fop/fo/flow/Table.java b/src/org/apache/fop/fo/flow/Table.java
index daffbe5a3..796f0039d 100644
--- a/src/org/apache/fop/fo/flow/Table.java
+++ b/src/org/apache/fop/fo/flow/Table.java
@@ -323,7 +323,7 @@ public class Table extends FObj {
/**
* Return the content width of the boxes generated by this table FO.
*/
- protected int getContentWidth() {
+ public int getContentWidth() {
if (areaContainer != null)
return areaContainer.getContentWidth(); //getAllocationWidth()??
else return 0; // not laid out yet
diff --git a/src/org/apache/fop/fo/pagination/Region.java b/src/org/apache/fop/fo/pagination/Region.java
index 8893fae8c..449982bca 100644
--- a/src/org/apache/fop/fo/pagination/Region.java
+++ b/src/org/apache/fop/fo/pagination/Region.java
@@ -158,4 +158,8 @@ public abstract class Region extends FObj
name.equals( "xsl-footnote-separator" ));
}
+ public boolean generatesReferenceAreas() {
+ return true;
+ }
+
}