diff options
author | Jeremias Maerki <jeremias@apache.org> | 2005-08-29 12:03:27 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2005-08-29 12:03:27 +0000 |
commit | 6e9f01380445f759699b16f43a37b360f075882a (patch) | |
tree | f0193a12b125a6e8af2b68b0025f5ed3eccc2ad9 /src/java/org/apache/fop/area/Trait.java | |
parent | f883f199b673ab284d45c0b8218c92dcee1b8ba8 (diff) | |
download | xmlgraphics-fop-6e9f01380445f759699b16f43a37b360f075882a.tar.gz xmlgraphics-fop-6e9f01380445f759699b16f43a37b360f075882a.zip |
Background trait's toString() streamlined. Test cases adjusted accordingly.
Test cases without checks will fail from now on!!!
Checks for certain test cases and the others are added to the disabled list.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@264120 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/area/Trait.java')
-rw-r--r-- | src/java/org/apache/fop/area/Trait.java | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/src/java/org/apache/fop/area/Trait.java b/src/java/org/apache/fop/area/Trait.java index fa44ebe4d..044874cc9 100644 --- a/src/java/org/apache/fop/area/Trait.java +++ b/src/java/org/apache/fop/area/Trait.java @@ -14,11 +14,12 @@ * limitations under the License. */ -/* $Id: Trait.java,v 1.4 2004/02/27 17:41:26 jeremias Exp $ */ +/* $Id$ */ package org.apache.fop.area; import org.apache.fop.datatypes.ColorType; +import org.apache.fop.fo.Constants; import org.apache.fop.image.FopImage; import org.apache.fop.traits.BorderProps; @@ -540,14 +541,29 @@ public class Trait implements Serializable { */ public String toString() { StringBuffer sb = new StringBuffer(); - sb.append("color=" + color); + sb.append("color=").append(color); if (url != null) { - sb.append(",url="); - sb.append(url); + sb.append(",url=").append(url); + sb.append(",repeat="); + switch (repeat) { + case Constants.EN_REPEAT: + sb.append("repeat"); + break; + case Constants.EN_REPEATX: + sb.append("repeat-x"); + break; + case Constants.EN_REPEATY: + sb.append("repeat-y"); + break; + case Constants.EN_NOREPEAT: + sb.append("no-repeat"); + break; + default: + sb.append("ILLEGAL!"); + } + sb.append(",horiz=").append(horiz); + sb.append(",vertical=").append(vertical); } - sb.append(",repeat=" + repeat); - sb.append(",horiz=" + horiz); - sb.append(",vertical=" + vertical); return sb.toString(); } |