diff options
author | Glen Mazza <gmazza@apache.org> | 2003-11-05 23:48:47 +0000 |
---|---|---|
committer | Glen Mazza <gmazza@apache.org> | 2003-11-05 23:48:47 +0000 |
commit | f34418c2321f603df21b4a2f0b14d57cd0793734 (patch) | |
tree | eadca3ec0c2ead0dff28116fde73dc4713ee8343 /src/java | |
parent | a47a0676d84c199f2208fafbf234a6cf7041a883 (diff) | |
download | xmlgraphics-fop-f34418c2321f603df21b4a2f0b14d57cd0793734.tar.gz xmlgraphics-fop-f34418c2321f603df21b4a2f0b14d57cd0793734.zip |
toString() methods implemented for these objects for help in
testing/debugging.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196982 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
4 files changed, 30 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/fo/properties/CommonBackground.java b/src/java/org/apache/fop/fo/properties/CommonBackground.java index eb9db19bf..9e88ae22d 100644 --- a/src/java/org/apache/fop/fo/properties/CommonBackground.java +++ b/src/java/org/apache/fop/fo/properties/CommonBackground.java @@ -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"; + } } diff --git a/src/java/org/apache/fop/fo/properties/CommonBorderAndPadding.java b/src/java/org/apache/fop/fo/properties/CommonBorderAndPadding.java index 1da21d5b5..c172bc041 100644 --- a/src/java/org/apache/fop/fo/properties/CommonBorderAndPadding.java +++ b/src/java/org/apache/fop/fo/properties/CommonBorderAndPadding.java @@ -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"; + } } diff --git a/src/java/org/apache/fop/traits/LayoutProps.java b/src/java/org/apache/fop/traits/LayoutProps.java index 002901a56..efc266bac 100644 --- a/src/java/org/apache/fop/traits/LayoutProps.java +++ b/src/java/org/apache/fop/traits/LayoutProps.java @@ -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"; + } } diff --git a/src/java/org/apache/fop/traits/SpaceVal.java b/src/java/org/apache/fop/traits/SpaceVal.java index 762b65305..b34ef7f0c 100644 --- a/src/java/org/apache/fop/traits/SpaceVal.java +++ b/src/java/org/apache/fop/traits/SpaceVal.java @@ -133,5 +133,8 @@ public class SpaceVal { return space; } + public String toString() { + return "SpaceVal: " + getSpace().toString(); + } } |