From: Jeremias Maerki Date: Mon, 7 Feb 2005 10:53:26 +0000 (+0000) Subject: Method for determining if there's a background at all. X-Git-Tag: Root_Temp_KnuthStylePageBreaking~124 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d6f3fb4902d63eeb385cb9c312ac63cc5abf4f76;p=xmlgraphics-fop.git Method for determining if there's a background at all. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198383 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java b/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java index 0a6083530..03cf70c2d 100755 --- a/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java +++ b/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java @@ -272,4 +272,11 @@ public class CommonBorderPaddingBackground implements Cloneable { "Padding: (" + getPaddingBefore(false) + ", " + getPaddingAfter(false) + ", " + getPaddingStart(false) + ", " + getPaddingEnd(false) + ")\n"; } + + /** + * @return true if there is any kind of background to be painted + */ + public boolean hasBackground() { + return ((backgroundColor != null || getFopImage() != null)); + } }