]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Convenience method to access conditionality component.
authorJeremias Maerki <jeremias@apache.org>
Fri, 11 Mar 2005 13:28:08 +0000 (13:28 +0000)
committerJeremias Maerki <jeremias@apache.org>
Fri, 11 Mar 2005 13:28:08 +0000 (13:28 +0000)
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

index d28f38c371755daedacf2af05f69b5348fdf46d2..2ef52a48f21dd66381539d1ec15ea11efc2987b8 100644 (file)
@@ -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() +