From b23a3cab041d6ba0f093fb4e8efad55c1bee8c37 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Fri, 11 Mar 2005 13:28:08 +0000 Subject: [PATCH] Convenience method to access conditionality component. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198479 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/fo/properties/SpaceProperty.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/java/org/apache/fop/fo/properties/SpaceProperty.java b/src/java/org/apache/fop/fo/properties/SpaceProperty.java index d28f38c37..2ef52a48f 100644 --- a/src/java/org/apache/fop/fo/properties/SpaceProperty.java +++ b/src/java/org/apache/fop/fo/properties/SpaceProperty.java @@ -18,6 +18,7 @@ package org.apache.fop.fo.properties; +import org.apache.fop.fo.Constants; import org.apache.fop.fo.FObj; import org.apache.fop.fo.PropertyList; import org.apache.fop.fo.expr.PropertyException; @@ -126,6 +127,14 @@ public class SpaceProperty extends LengthRangeProperty { return this.conditionality; } + /** + * Indicates if the length can be discarded on certain conditions. + * @return true if the length can be discarded. + */ + public boolean isDiscard() { + return this.conditionality.getEnum() == Constants.EN_DISCARD; + } + public String toString() { return "Space[" + "min:" + getMinimum().getObject() + -- 2.39.5