gmazza      2003/11/05 15:48:47

  Modified:    src/java/org/apache/fop/fo/properties CommonBackground.java
                        CommonBorderAndPadding.java
               src/java/org/apache/fop/traits LayoutProps.java
                        SpaceVal.java
  Log:
  toString() methods implemented for these objects for help in
  testing/debugging.
  
  Revision  Changes    Path
  1.2       +10 -2     
xml-fop/src/java/org/apache/fop/fo/properties/CommonBackground.java
  
  Index: CommonBackground.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/CommonBackground.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CommonBackground.java     12 Aug 2003 18:02:45 -0000      1.1
  +++ CommonBackground.java     5 Nov 2003 23:48:47 -0000       1.2
  @@ -66,5 +66,13 @@
       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";
  +    }
   }
  
  
  
  1.2       +11 -3     
xml-fop/src/java/org/apache/fop/fo/properties/CommonBorderAndPadding.java
  
  Index: CommonBorderAndPadding.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/CommonBorderAndPadding.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CommonBorderAndPadding.java       12 Aug 2003 18:02:45 -0000      1.1
  +++ CommonBorderAndPadding.java       5 Nov 2003 23:48:47 -0000       1.2
  @@ -175,7 +175,6 @@
           return getPadding(TOP, bDiscard);
       }
   
  -
       public int getBorderWidth(int side, boolean bDiscard) {
           if ((borderInfo[side] == null)
                   || (borderInfo[side].mStyle == Constants.NONE)
  @@ -209,5 +208,14 @@
               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";
  +    }
   }
  
  
  
  1.2       +8 -0      xml-fop/src/java/org/apache/fop/traits/LayoutProps.java
  
  Index: LayoutProps.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/traits/LayoutProps.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LayoutProps.java  11 Mar 2003 13:05:36 -0000      1.1
  +++ LayoutProps.java  5 Nov 2003 23:48:47 -0000       1.2
  @@ -99,5 +99,13 @@
           // 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";
  +    }
   }
   
  
  
  
  1.3       +3 -0      xml-fop/src/java/org/apache/fop/traits/SpaceVal.java
  
  Index: SpaceVal.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/traits/SpaceVal.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SpaceVal.java     28 Aug 2003 19:08:59 -0000      1.2
  +++ SpaceVal.java     5 Nov 2003 23:48:47 -0000       1.3
  @@ -133,5 +133,8 @@
           return space;
       }
   
  +    public String toString() {
  +        return "SpaceVal: " + getSpace().toString();
  +    }
   }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to