]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
toString() methods implemented for these objects for help in
authorGlen Mazza <gmazza@apache.org>
Wed, 5 Nov 2003 23:48:47 +0000 (23:48 +0000)
committerGlen Mazza <gmazza@apache.org>
Wed, 5 Nov 2003 23:48:47 +0000 (23:48 +0000)
testing/debugging.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196982 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fo/properties/CommonBackground.java
src/java/org/apache/fop/fo/properties/CommonBorderAndPadding.java
src/java/org/apache/fop/traits/LayoutProps.java
src/java/org/apache/fop/traits/SpaceVal.java

index eb9db19bf0444cd0e17a39340ef254d6f3a2b964..9e88ae22d39e93c91fcb42a66c78c2122c9e2b02 100644 (file)
@@ -66,5 +66,13 @@ public class CommonBackground {
     public int backRepeat;
     public Length backPosHorizontal;
     public Length backPosVertical;
-
+    
+    public String toString() {
+        return "CommonBackground:\n" +
+        "backAttachment = " + backAttachment + "; backColor = " + 
+        ((backColor != null) ? backColor.toString() : "null") + "\n" +
+        "backImage = " + backImage + "; backRepeat = " + backRepeat + "\n" +
+        "backPosHorizontal = " + backPosHorizontal + 
+        "; backPosVertical = " + backPosVertical + "\n";
+    }
 }
index 1da21d5b5c10910ae820352900acb24815e51808..c172bc04110515b742ee4377b8deb3ef79abd9f4 100644 (file)
@@ -175,7 +175,6 @@ public class CommonBorderAndPadding implements Cloneable {
         return getPadding(TOP, bDiscard);
     }
 
-
     public int getBorderWidth(int side, boolean bDiscard) {
         if ((borderInfo[side] == null)
                 || (borderInfo[side].mStyle == Constants.NONE)
@@ -209,5 +208,14 @@ public class CommonBorderAndPadding implements Cloneable {
             return padding[side].iLength;
         }
     }
-
+    
+    public String toString() {
+        return "CommonBordersAndPadding (Before, After, Start, End):\n" +
+        "Borders: (" + getBorderTopWidth(false) + ", " + getBorderBottomWidth(false) + ", " +
+        getBorderLeftWidth(false) + ", " + getBorderRightWidth(false) + ")\n" +
+        "Border Colors: (" + getBorderColor(BEFORE) + ", " + getBorderColor(AFTER) + ", " +
+        getBorderColor(START) + ", " + getBorderColor(END) + ")\n" +
+        "Padding: (" + getPaddingTop(false) + ", " + getPaddingBottom(false) + ", " +
+        getPaddingLeft(false) + ", " + getPaddingRight(false) + ")\n";
+    }
 }
index 002901a560b1324d84ed23e7283325918d43d34e..efc266bace7a8f98bfd4cdfff715ba4acfb385bb 100644 (file)
@@ -99,5 +99,13 @@ public class LayoutProps {
         // Parent span always overrides child span
         bIsSpan = parentLP.bIsSpan;
     }
+
+    public String toString() {
+        return "LayoutProps:\n" +
+        "breakBefore = " + breakBefore + "; breakAfter = " + breakAfter + "\n" +
+        "spaceBefore = " + ((spaceBefore != null) ? spaceBefore.toString() : "null") + "\n" +
+        "spaceAfter = " + ((spaceAfter != null) ? spaceAfter.toString() : "null") + "\n" +
+        "bIsSpan = " + bIsSpan + "\n";
+    }
 }
 
index 762b65305c8136347ec7b5f412074236764c5418..b34ef7f0c4a23a8aa4450e66c54c72ac3f8e3c58 100644 (file)
@@ -133,5 +133,8 @@ public class SpaceVal {
         return space;
     }
 
+    public String toString() {
+        return "SpaceVal: " + getSpace().toString();
+    }
 }