]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Added getBPPaddingAndBorder() to return the border and padding length in
authorFinn Bock <bckfnn@apache.org>
Thu, 29 Jan 2004 19:37:02 +0000 (19:37 +0000)
committerFinn Bock <bckfnn@apache.org>
Thu, 29 Jan 2004 19:37:02 +0000 (19:37 +0000)
the BP direction.

PR: 25802.

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

src/java/org/apache/fop/fo/properties/CommonBorderAndPadding.java

index 077b9033c4a9f8bda317e161190b0901f0677080..6f6420fd98fc392c1af362db607c3bbfca577564 100644 (file)
@@ -213,7 +213,18 @@ public class CommonBorderAndPadding implements Cloneable {
             return padding[side].iLength;
         }
     }
-    
+
+    /**
+     * Return all the border and padding height in the block progression 
+     * dimension.
+     * @param bDiscard the discard flag.
+     * @return all the padding and border height.
+     */
+    public int getBPPaddingAndBorder(boolean bDiscard) {
+        return getPaddingBefore(bDiscard) + getPaddingAfter(bDiscard) +
+               getBorderBeforeWidth(bDiscard) + getBorderAfterWidth(bDiscard);        
+    }
+
     public String toString() {
         return "CommonBordersAndPadding (Before, After, Start, End):\n" +
         "Borders: (" + getBorderBeforeWidth(false) + ", " + getBorderAfterWidth(false) + ", " +