aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/layoutmgr/SpaceSpecifier.java
diff options
context:
space:
mode:
authorGlen Mazza <gmazza@apache.org>2003-11-09 15:38:27 +0000
committerGlen Mazza <gmazza@apache.org>2003-11-09 15:38:27 +0000
commitcc5cbd4f82e565344ee853359c0ef4fd69a06abd (patch)
tree18cc25761bd83d8def41c7138cd01f1e51077278 /src/java/org/apache/fop/layoutmgr/SpaceSpecifier.java
parent62e0b02e68248c8f81c8147a0c60d887c3fbd397 (diff)
downloadxmlgraphics-fop-cc5cbd4f82e565344ee853359c0ef4fd69a06abd.tar.gz
xmlgraphics-fop-cc5cbd4f82e565344ee853359c0ef4fd69a06abd.zip
A few more toString() implementations helpful for debugging spacing
issues in BLM. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197001 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/layoutmgr/SpaceSpecifier.java')
-rw-r--r--src/java/org/apache/fop/layoutmgr/SpaceSpecifier.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/SpaceSpecifier.java b/src/java/org/apache/fop/layoutmgr/SpaceSpecifier.java
index 816e97cae..1bf8e7bcb 100644
--- a/src/java/org/apache/fop/layoutmgr/SpaceSpecifier.java
+++ b/src/java/org/apache/fop/layoutmgr/SpaceSpecifier.java
@@ -63,17 +63,17 @@ import org.apache.fop.traits.MinOptMax;
public class SpaceSpecifier implements Cloneable {
- private boolean bStartsRefArea;
+ private boolean bStartsReferenceArea;
private boolean bHasForcing = false;
private List vecSpaceVals = new java.util.ArrayList();
/**
* Creates a new SpaceSpecifier.
- * @param bStarts true if it starts anew reference area
+ * @param bStarts true if it starts a new reference area
*/
public SpaceSpecifier(boolean bStarts) {
- bStartsRefArea = bStarts;
+ bStartsReferenceArea = bStarts;
}
/**
@@ -82,6 +82,8 @@ public class SpaceSpecifier implements Cloneable {
public Object clone() {
try {
SpaceSpecifier ss = (SpaceSpecifier) super.clone();
+ ss.bStartsReferenceArea = this.bStartsReferenceArea;
+ ss.bHasForcing = this.bHasForcing;
// Clone the vector, but share the objects in it!
ss.vecSpaceVals = new ArrayList();
ss.vecSpaceVals.addAll(this.vecSpaceVals);
@@ -115,7 +117,7 @@ public class SpaceSpecifier implements Cloneable {
* add it to the sequence.
*/
public void addSpace(SpaceVal moreSpace) {
- if (!bStartsRefArea
+ if (!bStartsReferenceArea
|| !moreSpace.isConditional()
|| !vecSpaceVals.isEmpty()) {
if (moreSpace.isForcing()) {
@@ -182,4 +184,10 @@ public class SpaceSpecifier implements Cloneable {
}
return resSpace;
}
+
+ public String toString() {
+ return "Space Specifier (resolved at begin/end of ref. area:):\n" +
+ resolve(false).toString() + "\n" +
+ resolve(true).toString();
+ }
}